[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: script help



adrian kok wrote:
Hi

I have script to remove files but it can't work in
directory


ls *log | sort -r | sed -e 1,1d | xargs rm -f

those folders are:

Nov28-log
Nov29-log
Nov30-log

By 'folders', do you mean that these are directories? You need to 'rm -rf' directories to remove the with their contents, or you can 'rmdir' if they are empty.

--
  Les Mikesell
   lesmikesell gmail com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]