Posts Tagged With: remove

Delete User

Tagged with: , , , , ,

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


userdel -r user1
No Comments »

Remove a Folder from Git

Tagged with: , , , , ,

Remove a given folder from a Git repository…


git rm -r cache/
No Comments »

Remove SVN Info from a Folder

Tagged with: , , , ,

This command removes the SVN data from a folder.


find -name .svn -exec rm -rf {} \;
1 Comment »

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 »

Remove an existing Kernel

Tagged with: , , , ,

The final numbers(2.6.20.6) is the version of you kernel. You can get this using uname -r (for the current kernel)

rm -rf /lib/modules/2.6.20.6
rm /boot/System.map-2.6.20.6
rm /boot/vmlinuz-2.6.20.6
rm /boot/initrd-2.6.20.6.img
rm /boot/config-2.6.20.6
No Comments »

Remove CVS Information from a Folder

Tagged with: , , , , , ,

find -name CVS -exec rm -rf {} \;

NOTE: Works only with bash

No Comments »