Tag: delete
Delete Leading Whitespace Using Sed
May 12, 2009
Delete leading whitespace (spaces/tabs/etc) from beginning of each line. Same as yesterday’s command – but using sed cat file.txt |…
Delete Leading Whitespace
May 11, 2009
Delete leading whitespace (spaces/tabs/etc) from beginning of each line ruby -pe ‘gsub(/^\s+/, “”)’ < file.txt
Remove SVN Info from a Folder
July 7, 2008
This command removes the SVN data from a folder. find -name .svn -exec rm -rf {} \;
Remove all EXE files
April 15, 2008
Removes all exe files in the current directory tree. Useful to clear virus from flash drives. find . -name “*.exe”…
Uninstall Using Yum
March 23, 2008
Use this command to remove a rpm package. yum remove package_name
Remove Empty Lines and Comments
February 12, 2008
Remove comments and blank lines from example.pl sed ‘/ *#/d; /^$/d’ example.pl
Remove empty directories
September 13, 2007
Remove all empty directories within the current directory find . -type d -empty -exec rmdir {} \; perl -MFile::Find -e”finddepth(sub{rmdir},’.’)”…
Recent Comments