![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find command from a shell script | kodermanna | UNIX for Advanced & Expert Users | 6 | 01-28-2008 02:37 AM |
| Shell script to Find file size | ragsnovel | Shell Programming and Scripting | 1 | 08-10-2007 07:01 AM |
| Can anyone find a bug in this code?? shell script | amon | Shell Programming and Scripting | 1 | 09-18-2006 11:11 PM |
| NEWBIE: If and Find in shell script | meskue | Shell Programming and Scripting | 1 | 06-29-2006 10:28 PM |
| shell script to find files | naren_samba2005 | Shell Programming and Scripting | 2 | 10-21-2005 02:06 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
c shell script help with find
Okie here is my problem,
1. I have a directory with a ton of files. 2. I want to first get an input on how many days ago the files were created. 3. I will take those files and put it into another file 4. Then I will take the last # from each line and subtract by 1 then diff the line from the file from the line that was subtracted. I was thinking of first using ex: "find . -name '*file_num_*' -print > latestfiles" then i am unsure of where to go from there. is there a flag on find that will let me take the files created within a date range of certain number of days ago? |
| Forum Sponsor | ||
|
|
|
|||
|
okie heres what i got so far in ksh
1. asks for number of days file was created... 2. "read day_ago" 3. "find . -name '*file_num_*' -mtime -$days_ago -print > File" Now i just need to know how to subtract the last 2 characters from each line on the file by 1 then diff the original with the subtracted version. |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|