Saturday, February 15, 2014

Few more resourceful linux commands

Delete a user :
----------------------------

sudo deluser username

If you would like to detach a user from a group:
 ------------------------------------------------------------------------------

sudo usermod groupname username (or)

sudo deluser username groupname

Kill all the processes of a user:
--------------------------------------------------
login to that particular user node, then,

sudo killall -9 username 

remove all the files and folder in a directory:
------------------------------------------------------------------------
 sudo rm -rf folder/*

(or)

to remove the directory itself, skip the '*' (i.e)

sudo rm -rf folder/

- Occasional updater
Sesha.

No comments:

Post a Comment