Script to Move files
Hi,
I want to write a shell script which will look into the directory for the files which has been modified / updated on today's date and move them into the directory which has been named based on Today's date. For ex: Suppose that todays date is OCT 15, then it will select all files having date modified/created as OCT 15 and then make a dir OCT 15 and move all these files to this directory. I am able to get date and make directory accordingly using following cmd d=`date "+%b %d" mkdir $d But I am not able to select files based on date and move them into this folder. Can anyone please tell me how to do that? Thanks. Rajesh |
Here ya go! The modification date is at less than one day ( today )
with the command: -mtime -1 Code:
#!/bin/bash |
All times are GMT -5. The time now is 08:31 PM. |