0
I have a folder in my server which contains some files. These are automated that means everyday we get new files automatically which will overwrite the old ones. So want to take a back up for this data. How can i copy all these files in to a another folder by renaming the files with current date while copying.
ex : i have a folder named folder1 which contains 4 files. path for this folder is home/install/project1/folder1
aaa.dat
bbb.dat
ccc.dat
ddd.dat
now i want to copy all these four files in to a different folder named folder2. path for this folder is home/install/project1/folder2. while copying these files i want to rename each file and add the current date to the file. so my file names in folder2 should be..
aaa091012.dat
bbb091012.dat
ccc091012.dat
ddd091012.dat
I want to write a Linux
shell script for this. Please give me some idea or some sample scripts related to this.
@JimGarrison, i tried this command...$ mv /directory_one/* /directory – G M Ramesh – 2013-03-04T05:47:57.197
@JimGarrison, for unix shell , i know the script how to copy files but for linux i dont know... if the unix commands works for linux also then its ok. i can make it out... – G M Ramesh – 2013-03-04T05:49:19.727
298% of Unix commands have identical or very similar counterparts in Linux. – Ex Umbris – 2013-03-04T05:52:16.760
@GMRamesh: which linux flavor are you using? Ubuntu? – mvp – 2013-03-04T05:54:44.360
I am using Red Hat – G M Ramesh – 2013-03-04T05:57:28.997
@JimGarrison, thank u Jim... i will check that command now – G M Ramesh – 2013-03-04T05:58:10.463