iSeriesCodePoet
Programmer
Hello all,
Here's the thing, I am trying to do this on an AS400 QShell, which is IBM's Unix like interface to their IFS (file system). I am trying to figure out how to write the command to delete files that are older than a certain age, lets say 30 days. There is a find command, but I don't know the syntax very well, I thought someone here could help me.
Our directory structure is set up so the files are located in subdirectories such as /dirname/dir1, /dirname/dir2, etc.
This is what I have so far: find -f /dirname *.pdf This works, it displays all the files in the directories underneath /dirname. But I am trying to get the files of older that 30 days with: find -f /lawpdf *.pdf -ctime 30, but errors out on me. I am not touching the deleting until I know that this part works first.
Can anyone give me some pointers here? Mike Wills
RPG Programmer (but learning Java)
"I am bad at math because God forgot to include math.h into my program!"
Here's the thing, I am trying to do this on an AS400 QShell, which is IBM's Unix like interface to their IFS (file system). I am trying to figure out how to write the command to delete files that are older than a certain age, lets say 30 days. There is a find command, but I don't know the syntax very well, I thought someone here could help me.
Our directory structure is set up so the files are located in subdirectories such as /dirname/dir1, /dirname/dir2, etc.
This is what I have so far: find -f /dirname *.pdf This works, it displays all the files in the directories underneath /dirname. But I am trying to get the files of older that 30 days with: find -f /lawpdf *.pdf -ctime 30, but errors out on me. I am not touching the deleting until I know that this part works first.
Can anyone give me some pointers here? Mike Wills
RPG Programmer (but learning Java)
"I am bad at math because God forgot to include math.h into my program!"