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

Re: script help



Dave Ihnat wrote:
On Mon, Dec 01, 2008 at 04:10:50PM -0500, RGH wrote:
   ls -1d *log | xargs rm -Rf
Note that the first option is a one, not an el.

Or for that matter, just "echo *log" instead of ls.

Neither of those are reliable. If there are enough matches to require xargs, then both ls and echo will fail. xargs also doesn't care whether or not each entry is printed on its own line, so "ls -1" isn't better than "ls" with no argument.


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