![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can somebody solve this | sreenusola | UNIX for Dummies Questions & Answers | 13 | 09-03-2008 04:55 PM |
| How to solve this | akashag22 | Shell Programming and Scripting | 3 | 07-21-2007 06:54 AM |
| Can AWK solve it ??? | emon | Shell Programming and Scripting | 1 | 02-23-2005 01:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Can somebody solve this please
I have to find the files older than 200 days from a path and copy them to some other directory with the current date stamp attached to it.
i have written like follows: #!/bin/ksh DSTAMP=$(date +"%y%m%d%H%M") rm $CA_OUT_PATH/ftp_logs/temp touch $CA_OUT_PATH/ftp_logs/temp chmod 777 $CA_OUT_PATH/ftp_logs/temp find $CA_OUT_PATH/*/ftp_out -type f -mtime -200 > $CA_OUT_PATH/ftp_logs/temp while read line do cp -f $line $CA_OUT_PATH/ftp_logs/${line}.$DSTAMP done < $CA_OUT_PATH/ftp_logs/temp but its trying to copy the entire path of the file and failing. I need to copy the only filenames.datestamp after the search pls look in to this help me out. |
|
||||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|