Sponsored Content
Top Forums Shell Programming and Scripting Please help I want script to check filename, size and date in specify path. Post 302533740 by DGPickett on Friday 24th of June 2011 01:37:29 PM
Old 06-24-2011
First, see man comm. comm can tell you what is new and what is missing, from unique sorted lists.

The header can be a presentation artifact, and the data is easy to make from ls and the like. 'find' can find all the current files. 'sort -u' can sort unique. You can pipe it all together. I suppose that is mod date/time. It might be simplest to use some variation of ls output, like ls --full-time for the LINUX ls. You might want to know if someone has been fingering permissions, too. Else, you need some work to normalize the mod time, or a different source. Easy to do in C with stat(), and PERL.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to check path exist or not in UNIX shell script

UNIX Shell Script I'm in /home/suneel dirctory in that directory need to check for a path for example com/src/resources If Path exists need to copy the files from one directory If path not exist need to create the folders and copy the files UNIX shell script help required (3 Replies)
Discussion started by: suneelc
3 Replies

2. Shell Programming and Scripting

how to find the path of a file when it is passed as ....filename(parameter) to script

hi unix guru's..................:confused: question is posted in the #3 permalink shown below. (3 Replies)
Discussion started by: yahoo!
3 Replies

3. Shell Programming and Scripting

to check whether a directory or filename path is valid or not

the script on excution should take a directory path from useran a numric input and it should check indicate whether its write or not? if the cmmd sh<script-name>,dir/path.<500>" is greater than 500 in size should be copied to dir ,temp in pwd and display the mesage'files of 2000 bytes hav been... (4 Replies)
Discussion started by: arukr
4 Replies

4. Shell Programming and Scripting

Perl Script to check file date and size

Hi guys, i am new to perl. I started reading the perl documents and try to come up with some logic. I am trying to create a script that would go into a location, search for todays files, then searches for all .txt files from today. If todays not found, its an error If file size is less... (26 Replies)
Discussion started by: DallasT
26 Replies

5. Shell Programming and Scripting

binaries PATH check in a ksh script

The situation is a data center with around 800 servers. Each server has installed one of these unix-like OS: rhel, sunos, aix, hp-ux. And we have to make scripts general enough to being able to be executed over all these servers. Furthermore, sometimes the scripts will be executed as a... (1 Reply)
Discussion started by: asanchez
1 Replies

6. Windows & DOS: Issues & Discussions

Check dir for overly path+filename and list in txt

Well since Windows always laments over some of my files having a too long "path+filename" and it gets in the way of copying complete directory structures I would love to have a DOS Script that helps me with finding those. I already tried DCSoft Long Filename Finder but that is neither DOS based... (3 Replies)
Discussion started by: pasc
3 Replies

7. Shell Programming and Scripting

Script to locate date in filename

I am looking for a way to find a date in the file without using find. for example something like this: files=`ls |grep txt` YEST=`TZ="GMT+24" date +'%m-%d-%Y'|sed 's/^0//g' |sed 's/$/.txt/g'` YES1=`TZ="GMT+48" date +'%m-%d-%Y'|sed 's/^0//g' |sed 's/$/.txt/g'` if ]; then echo yes;else echo... (4 Replies)
Discussion started by: newbie2010
4 Replies

8. Shell Programming and Scripting

Shell script to find the wrong filename in a path and raise a trap for it

Example: I have server name A with an IP : 125.252.235.455 I have an username /password to login into this server under SSH connection In this server i have a path /apps/user/filename(Big.txt) Everyday we used to get the filename as Big.txt. I want a shell script to monitor this path... (4 Replies)
Discussion started by: ChandruBala73
4 Replies

9. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies

10. UNIX for Beginners Questions & Answers

Bash script - Remove the 3 top level of a full path filename

Hello. Source file are in : /a/b/c/d/e/f/g/some_file Destination is : /d/e where sub-directories "f" and "g" may missing or not. After copying I want /a/b/c/d/e/f/g/file1 in /d/e/f/g/file1 On source /a is top-level directory On destination /d is top-level directory I would like... (2 Replies)
Discussion started by: jcdole
2 Replies
PTSB(1p)						User Contributed Perl Documentation						  PTSB(1p)

NAME
ptsb - Interact with you Permanent TSB homebanking from your shell! SYNOPSIS
ptsb [options] Print accounts balance: "ptsb [ -F /path/of/conf/file ] -b" Print account statement: "ptsb [ -F /path/of/conf/file ] -s -a c -n <4digits" -f yyyy/mm/dd -t yyyy/mm/dd> If your are running Linux you can use the date --date command to simplify the date range definition. You can put these aliases on your ~/.bashrc: alias ptsb_stat='ptsb --statement -a c -n xyzt' alias ptst_last_month="statement_current -f `date +%Y/%m/%d --date='1 month ago'` -t `date +%Y/%m/%d`" OPTIONS
-h | --help this help usage message! -D | --debug Enable debug. This will be more verbose and will leave html on the current working directory. -F /path/to/config/file | --file /path/to/config/file filename configuration file path (default: ~/.ptsbrc). Please refer to manual page to see how this file is built. -b | --balance print account balance -s | --statement print account statement -T type | --transation-type type Type of transaction to look on the statement. Type can be: ALL, WITHDRAWAL, DEPOSIT -f | --from--date yyyy/mm/dd from date -t | --to-date yyyy/mm/dd to date -a [c | v] | --account-type [c | v] account type: can be 'c' (current account) or 'v' for (visa card) -n digits | --account-num digits 4 digits representing the last 4 digits of the account number or visa card number. -N | --no-balance Do not print balance when printing statement. -r | --regexp When printing statement grep using the regexp provided -e | --expr where expression is a mathematical expression like '<300' '=300' '>=300' the expression will test the euro amount column only lines matching the expression will be printed -g | --graph Print graph of the statement using gnuplot. Gnuplot is required! -i path | --image path Save PNG image in path. -o filename | --output filename Save the output of the statement inside a CSV file named filename. CSV format is: date,description,amount,balance last field presence depends on the -N flag. -v | --version Print version CONFIGURATION FILE
Configuration file default location is ~/.ptsbrc and it looks like this: -------8< -- ~/.ptsbrc -->8---------- open24_number=your_open24_number password=your_internet_password pan=your_personal_access_number -------8< --------------->8---------- However you can put wherever you want. Just remember to use then the option -F /path/to/your/location. Lines beginning with # will be interpreted as comment. Starting from release 0.08 ptsb will use GnuPG to encrypt the configuration file using the private key of the user. Therefore you'll have to create your key if you didn't do this yet. In case you want to decrypt your ptsbrc file use this command: $ gpg -d /path/to/your/ptsbrc This will print the encrypted file on the standard output. SEE ALSO
o Official CPAN page for Finance::Bank::IE::PermanentTSB http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB/lib/Finance/Bank/IE/PermanentTSB.pm <http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB/lib/Finance/Bank/IE/PermanentTSB.pm> o Author homepage <http://www.pallotron.net> o Author Blog (italian) <http://www.vitadiunsysadmin.net> o Author homepage on CPAN <http://search.cpan.org/~pallotron/> AUTHOR
Angelo "pallotron" Failla - <pallotron@freaknet.org> BUGS
Please report bugs to the author, no bug tracking system is set up yet. COPYRIGHT AND LICENSE
Copyright (C) 2009 by Angelo "pallotron" Failla This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. perl v5.12.3 2009-02-17 PTSB(1p)
All times are GMT -4. The time now is 06:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy