Hi
I need to move last 1 year old files from one folder to another location on same server.How to write a shell script for the same?
thanx
Lalit
Hi
I need to move last 1 year old files from one folder to another location on same server.How to write a shell script for the same?
thanx
Lalit
Hi,
Try this
find <source dir name> -mtime +365 | mv *.* <destination directory>
Thnks and Regards,
Subin
Thanx for quick response
but how to run this script bcoz i m new in unix evironment.
lalit
#####################
#!/bin/sh
find <source dir name> -mtime +365 | mv *.* <destination directory>
#########################
save this file as move.sh and try a run... Hope you got
Thanks,
Parkkavan
#!/bin/sh
find <source dir name> -mtime +365 | mv *.* <destination directory>
thanx for reply
where I put this file in machine?
Hi
I have to added in this script to tell to "Do you want to move the files" with Yes or No option, every time when I run this query.
thanx in advance
Lalit
Hi Lalit,
Please go through unix tutorial and try on your own. This is not a much big deal. Simple if else statement can do it.
Thanks,
Parkkavan
Thanx for reply
I need a script for moving one year old files from one folder to another folder on same server with autehntication---.
Thanx
Lalit