Moving Files one directory to another directory shell script

Hi,

Could you please assist how to move the gz files which are older than the 90 days from one folder to another folder ,before that it need to check the file system named "nfs" if size is less than 90 or not. If size is above 90 then it shouldn't perform file move and exit the script throwing log that file system is above threshold level using shell script.

Here NFS is the shared folder in my server.

eg:

source_folder /opt/psoft/PT8.47/webserv/peoplesoft/applications/peoplesoft/PSIGW/msgLog.gz

destination_folder /opt/psft

That is quite scarse a specification, leaving quite some details open and targets for guesswork from our side. E.g. why should the "nfs" file system be checked, as it is not part of the destination path, and for what, 90 files/bytes/percent? Where is the "log" pointing to?

You are following these forums for a year and a half now; you must have stumbled across solutions for similar or identical problems. So - any attempts/ideas/thoughts from your side? What tools would you prefer to deploy?

Thanks for Quick reply.

Please find the details :-

NFS is the destination folder where i'm trying to move the files and to avoid discrepancies because of space issue i want to have a check the size of nfs folder

i want log to be created in nfs folder with the timestamp of creation in name.

Sorry, but your informations are contradictory, and you answer only half the questions.

Hi Rudic,

Just suggest me . I am planning to put the automation script of last 90 days gzip files from one source to another destination folder using shell script.