Please direct me to the appropriate Forum if this is not the one.
Completely green amateur/noob here....
Can you tell me what the (complex?) command line would be for the following request in HPUX would be:
Identify all subfolders under a specified folder which meet the following criteria:
a) created within the last "x" days
b) the subfolder does not contain a file whose name includes "im_" OR alternatively if this is easier...the subfolders contain less than "y" bytes of data
---------- Post updated at 09:56 AM ---------- Previous update was at 09:47 AM ----------
Playing around with commands as we speak and perhaps I should detail what I am looking to accomplish (my request may be barking up the wrong tree)...
What happens:
Files are placed into a newly created folder by an outside application.
These folders are always created within a "specified" directory.
Occassionally, this application generates the folder but fails to place the files into that folder
What I am seeking is a way to identify those folders which were created but failed to have those files placed into them.
The concept is to look for those folders (via manual command line) within a specified time frame by performing a search for any additional folders once a failure is identified.
You have to use ctime - the last time the inode data for the directory was modified. This is usually the same as created time. The du command gives size of directory in kbytes (1024 bytes)
This User Gave Thanks to jim mcnamara For This Post:
Yes, that would just print to the terminal, but it's trivial to redirect it anywhere else.
Or just redirect the output of the script itself when you run it.
xargs and * are redundant here. xargs feeds arguments into the program it was given. These commands are equivalent for instance: