RMVLNK OBJLNK('Directory1/*') This CL command will remove everything under the Directory1 object path. My command actually goes two more levels deep. Not sure how "low you can go"........... I execute this every night to remove temporary PDF files that are created during the day through one of our s/w packages.
Unconfigured Ad Widget
Collapse
IFS Cleanup
Collapse
X
-
IFS Cleanup
Using QShell is one option. Qshell supports the unix find utility/command. Here is an example command... find . -type f -name "*.pdf" -mtime +30 -exec rm -f {} ; This will start in the current directory and find all files that have a suffix of pdf and have not been modified within the last 30 days. In this example the find cascades down the subdirectories under the current working directory. Alternatively to -mtime you could specify -atime which indicates last access (read but not modified).
-
-
IFS Cleanup
I've found that this appears to run a QZSHFCHLD job for each file it deletes. On my system, they leave joblogs behind, even though they complete normally. I haven't been able to figure out what jobd they're using (so I can change it), or if there's an ENVVAR I can use, or if the process can run "in" the session rather than run separate BCI jobs. I ended up with several thousand joblogs after cleaning up an old directory....
Comment
-
-
IFS Cleanup
Never mind, found some answers here http://www.itjungle.com/guruo/mgo022202-story01.html and here http://archive.midrange.com/midrange.../msg00612.html
Comment
-
-
IFS Cleanup
We have started to use the IFS to put PDF doc out there for users that don't need to access the green screens. Does anybody know a way or a tool to automatically do cleanup of directories in the IFS. We want to keep docs online for 30 day and then they are deleted. It is getting to be a pain to manually clean this up.
Comment
-
-
IFS Cleanup
Dave, I tried the QSHELL command that you have here but couldn't get it to work on our system. I'm running it in a batch submitted CL the code is below. When I run it without the '-exec rm -f{} ;' portion I get a list of all the files that haven't been accessed in over 30 days but once I put the '-exec re -f{} ;' back it comes back with a return code of 1... any ideas what I'm doing wrong?
Code
Comment
-
Comment