Posts Tagged With: remove

Remove Deb Package

Tagged with: , , , , , ,

Remove a deb package from the system


dpkg -r package_name
No Comments »

Remove www From URL using .htaccess in Apache

Tagged with: , , , , ,

This htaccess code will remove the ‘www’ part from the url. It uses the mod_rewrite module of apache to re-write the url – so make sure that’s installed.


RewriteEngine On 
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
5 Comments »

Delete User

Tagged with: , , , , ,

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


userdel -r user1 
1 Comment »

Remove a Folder from Git

Tagged with: , , , , ,

Remove a given folder from a Git repository…


git rm -r cache/
3 Comments »

Remove SVN Info from a Folder

Tagged with: , , , ,

This command removes the SVN data from a folder.


find -name .svn -exec rm -rf {} \;
2 Comments »

Exclude Removable Partitions from a ‘find’ Search

Tagged with: , , , , ,

Search files with ‘.rpm’ extension ignoring removable partitions as cdrom, pen-drive, etc.


find / -xdev -name \*.rpm
No Comments »

Remove Empty Characters at End of Lines

Tagged with: , , , ,

Remove empty characters at the end of each row


sed -e 's/ *$//' file.txt
No Comments »

Uninstall Using Yum

Tagged with: , , , ,

Use this command to remove a rpm package.


yum remove package_name
No Comments »

Remove Empty Lines

Tagged with: , , , , , , ,

Remove empty lines from a file using sed


sed '/^$/d' file.txt

Original Article

No Comments »

Remove empty directories

Tagged with: , , , , , ,

Remove all empty directories within the current directory


find . -type d -empty -exec rmdir {} \;
perl -MFile::Find -e"finddepth(sub{rmdir},'.')"

Delete Empty Directories
http://www.jonasjohn.de/lab/red.htm
[tags]empty,folder,delete,remove,perl,command,linux[/tags]

No Comments »