Results 1 to 2 of 2
How can I write a simple bash script that will remove the oldest file in all directories, but it should display these files including their dates and ask me if ...
- 11-12-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 10
Removing the oldest file in all directories
How can I write a simple bash script that will remove the oldest file in all directories, but it should display these files including their dates and ask me if i want to delete them first, before these files get deleted.
Thanks,
- 12-06-2008 #2
steps:
1. go over the directories one by one.
2. in every directory, say ls -lrt, and take the last entries and remove it off ??
Have you got it ??
Or you want some thing else ??


Reply With Quote
