Click to See Complete Forum and Search --> : Bash (konsole) problems


svarreby
09-13-2003, 02:18 PM
Hi guys!

When I try to run some admin tasks, as root, in bash, it doesn't recognize some commands, like group, mkdir etc.

group - group command not found
mkdir - I can't create several folders; like /new/folder/number/two .....I'll have to create every one at a time; like
mkdir new
then cd new
mkdir folder
cd folder
mkdir number ...etc etc

What is wrong?

o0zi
09-13-2003, 02:49 PM
You can't create new/folder/one if new and folder don't exist. As far as I'm aware, you have to type:

mkdir new new/folder new/folder/one

to create all the folders you need.

freakmn
09-13-2003, 03:05 PM
If you are su'ing, I believe that "su -" will use the paths for root, instead of the paths for the user you are su'ing from.

serz
09-13-2003, 03:13 PM
You have to use su - instead of just su, so it uses the root $PATH instead of your users's $PATH.

man su for more info.

X_console
09-13-2003, 10:57 PM
In order for you to create a whole set of subfolders that don't exist you need to use the -p option:

mkdir -p /new/folders/number/two

Check out man mkdir for more details.

mdwatts
09-14-2003, 08:44 AM
Originally posted by X_console

Check out man mkdir for more details.

Exactly... If the command does not work as expected, always check the manpage to see what options it offers.