On 13-Mar-2003/12:02 +0000, Zhi Cheng Wang <[EMAIL PROTECTED]> wrote: >thanks for the message. but i do not want to add current time, the time >stamp of the file is needed
There was a thread about that on this list a few months ago. There is no easy solution that will work across multiple versions of Linux. On my RH72 system, this works: cd $targetdir for datafile in `ls -1`; do modifydate=`ls --full-time $datafile | cut -c 44-62` formatteddate=`date -d "$modifydate" +%Y-%m-%d` mv "$datafile" "datafile.$formatteddate" done You'll have to modify the ls command and the columns of characters to cut depending on the version of ls that the system uses. Tony -- Anthony E. Greene <mailto:[EMAIL PROTECTED]> OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D AOL/Yahoo Messenger: TonyG05 HomePage: <http://www.pobox.com/~agreene/> Linux. The choice of a GNU generation <http://www.linux.org/> -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list