sdruss
asked on
unix delete the oldest file
In unix environment need csh or ksh script that will mangae directory of files. Only need the latest 10 log files, thus need script that removes the oldest file.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Great good stuff.
The answer accepted doesn't match your request.
Tintin,
as far as I can see, he wanted to get "the oldest" file deleted.
Your solution deletes all but the first ten files. Your solution is
much more enhanced and quite elegant -- but unfortunately
seems a bit overcrafted for the original Q.
as far as I can see, he wanted to get "the oldest" file deleted.
Your solution deletes all but the first ten files. Your solution is
much more enhanced and quite elegant -- but unfortunately
seems a bit overcrafted for the original Q.
Open in new window