Delete User
Tagged with: command, delete, Linux, remove, user, userdel
Thursday, July 24th, 2008 11:10 PM
Delete a user ( ‘-r’ eliminates home directory)
userdel -r user1
Delete a user ( ‘-r’ eliminates home directory)
userdel -r user1
Remove a given folder from a Git repository…
git rm -r cache/
This command removes the SVN data from a folder.
find -name .svn -exec rm -rf {} \;
Search files with ‘.rpm’ extension ignoring removable partitions as cdrom, pen-drive, etc.
find / -xdev -name \*.rpm
Remove empty characters at the end of each row
sed -e 's/ *$//' file.txt
Use this command to remove a rpm package.
yum remove package_name
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]
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
find -name CVS -exec rm -rf {} \;
NOTE: Works only with bash