Wednesday, February 24, 2010

Recursively change permissions of directories only

There was once I accidentally recursively changed permissions of a directory to 777. This meant that all my files in that directory became executable.

Changing it back to 666 recursively meant that all my directories are no longer executable.

using the -type and -exec options in find, we are able to find directories and change permissions for them only.

find Pathname/ -type d -exec chmod 777 {} \;

Thursday, February 18, 2010

How do you find what packages are installed in Debian Linux?

Using the dpkg command with --list option.  

type: dpkg --list to display the status of all the packages installed in the system.


Saturday, February 13, 2010

How to add a user in Debian Linux

To add a user, use the useradd command with all the options necessary.

In order to login with the new user, you'll need to add a password. Log in as root and type passwd username. The system will ask you to enter and re-enter the password.