Hello,
I have a simple Bash question which I do not seem to be able to get right.
I want to look for the oldest directory (inside a directory), and delete it. I am using the following:
rm -R $(ls -1t | tail -1)
ls -1t | tail -1 does indeed gives me the oldest directory, the The problem is that it is not deleting the directory, and that it also list files.
How could I please fix that?
Thank you very much,
Jary