Tag: remove

Remove Deb Package

Remove a deb package from the system dpkg -r package_name

Remove www From URL using .htaccess in Apache

This htaccess code will remove the ‘www’ part from the url. It uses the mod_rewrite module of apache to re-write…

Delete User

Delete a user ( ‘-r’ eliminates home directory) userdel -r user1

Remove a Folder from Git

Remove a given folder from a Git repository… git rm -r cache/

Remove SVN Info from a Folder

This command removes the SVN data from a folder. find -name .svn -exec rm -rf {} \;

Exclude Removable Partitions from a ‘find’ Search

Search files with ‘.rpm’ extension ignoring removable partitions as cdrom, pen-drive, etc. find / -xdev -name \*.rpm

Remove Empty Characters at End of Lines

Remove empty characters at the end of each row sed -e ‘s/ *$//’ file.txt

Uninstall Using Yum

Use this command to remove a rpm package. yum remove package_name

Remove Empty Lines

Remove empty lines from a file using sed sed ‘/^$/d’ file.txt Original Article

Remove empty directories

Remove all empty directories within the current directory find . -type d -empty -exec rmdir {} \; perl -MFile::Find -e”finddepth(sub{rmdir},’.’)”…