Hi Guys,
I want to delete folder/files older than 7 days. Im using the command below.
find /test/test1 -mtime +7 -print0 | xargs -0 rm -Rf /test/test1/*
which works ok, but it deletes the test1 folder as well which i dont want. The test1 folder will have a list of sub-folders which in turn will have files.I wont know the name of these sub-folders or files. I want to delete these sub -folders and files and preserve the test1 folder.
Any one any ideas.
Help much appreciated. Thanks.