ArchLUG Linux By Example - www.archlug.org

Download the RSS XML Feed for this site

Subscribe to this channel with Amphetadesk

Subscribe to this channel with RadioUserland

LBE- find


  • Find all the quicktime movie files in the current directory that start with eight numeric characters in their names and delete them.
find . -maxdepth 1 -name '*.mov' | perl -ne 'if (/^\d{8}/) {`rm $_`}'

or same thing using a different approach

ls *.mov | grep -E ^[0-9]{8} | xargs rm

Valid XHTML 1.0! Valid CSS!