Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
delete files in specific directory
Name: legato78 Date: March 27, 2006 at 22:13:12 Pacific OS: unix CPU/Ram: solaris 8 Product: sun solaris
Comment:
i have a directory "ABC" with lots of old files and sub directories in it. the issue now is i want to delete away files which are older than 15 days in "ABC" without deleting the files in the sub directories and without deleting the sub directory. i tried using find command but it will drill down to the sub directory and delete files. i have zero experience in scripting so lots of help will be appreciated :)
Now, if you are in the current directory that you want to search, it will only find the files in that current directory. For more info, check this link:
Summary: Dear Gurus, How do i delete files in a directory, based on a captured text file listing. E.g. ls {dir} > logfile.log rm {files listed in logfile.log} Please kindly advice. Thank you! Best Regards, And...