Hi,
I am trying to move old file to archive folder.
find /sourcedirectory/logs/* -type f -mtime +30 -exec mv "{}" /sourcedirectory/logs/archive \;
The above command not only search for old file in /sourcedirectory/logs/ folder but also searchs in /sourcedirectory/logs/archive ( what I meant to say is its doing recursive search.)
I dont want do recursive search. Can you help me in command which does not do recursively.
find /sourcedirectory/logs/* -type f -mtime +30 - which does recursively.
what is the command for non recursive?
Thanks for your help.
I am trying to move old file to archive folder.
find /sourcedirectory/logs/* -type f -mtime +30 -exec mv "{}" /sourcedirectory/logs/archive \;
The above command not only search for old file in /sourcedirectory/logs/ folder but also searchs in /sourcedirectory/logs/archive ( what I meant to say is its doing recursive search.)
I dont want do recursive search. Can you help me in command which does not do recursively.
find /sourcedirectory/logs/* -type f -mtime +30 - which does recursively.
what is the command for non recursive?
Thanks for your help.