VMaxx.net
VMaxx techie board!
 
 FAQ   Search   Memberlist   Usergroups   Register 
 Profile   Log in to check your private messages   Log in 

Code to rename file with the date in the filename

 
Post new topic   Reply to topic    VMaxx.net Forum Index -> Perl
View previous topic :: View next topic  
Author Message
vmaxx
Site Admin


Joined: 27 Dec 2003
Posts: 132

PostPosted: Thu Jul 20, 2006 1:05 am    Post subject: Code to rename file with the date in the filename Reply with quote

Code:
NOW=$(ls -l --time-style="+%b %e, %Y %k%M" a.txt  | awk '{ print $6"-"$7"-"$8 }' | sed -e 's/,//g')
cp a.txt $NOW.a.txt
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    VMaxx.net Forum Index -> Perl All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group