Re: Quick scripting question

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

 



On Sat, 6 Oct 2007 13:52:55 -0400
Todd Zullinger <tmz@xxxxxxxxx> wrote:

> Chris wrote:
> > How would I script removing a file (globally) ?
> 
> Very carefully. :)
> 
> > Meaning, say the file name test however, it's in multiple
> > directories throughout the system without having to go into each dir
> > manually.
> 
> This would find any file named test and remove it, by trawling the
> filesystem:
> 
> $ find / -name test | xargs rm
> 
> If the file you want to find has spaces or other odd characters in it,
> you may need to use:
> 
> $ find / -name test -print0 | xargs -0 rm
> 
> You could also use locate instead of find, which would save traversing
> the filesystem, but wouldn't catch files created since the locate db
> was updated last.
> 

Thank you sir!

-- 
Best regards,
Chris
Registerd Linux user number 448639

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux