Hello,
I have two directories and want to delete the top in a shell script.
2010_01_18
2010_01_20
I do an ls ls | head -n 1 which displays 2010_01_18, this is the directory I want to delete.
I try rm -rf < ls | head -n 1
I try ls | head -n 1 | rm -rf
neither deletes the directoy
I cant delete by date -mtime because the top dir gets modified to a later date that the second dir.
any help is appreciated!!
thx