Re: script help

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

 



Dave Ihnat wrote:
On Mon, Dec 01, 2008 at 04:22:16PM -0500, Bill Davidsen wrote:
That won't work if filenames contain blanks, something I fight daily.

For blanks, do something like "find . -name "*log" -exec rm -fr "{}" \;

I have a tiny program called "zeroify" which reads a line from input up to a newline, replaced the newline with a zero byte, and pushes it out stdout. Then I can use the "-0" option of xargs and not worry about special characters.

I worry that find is likely to discover things I don't want to remove, although it can be tamed with "-maxdepth" in most cases.

--
Bill Davidsen <davidsen@xxxxxxx>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux