Help with some commands

Hi I have linux test coming up and I got my hands on some books about linux server. From what I got told most of them should be the same command.
But this is where the issue lases.

The first command I am trying to do is

(1) mkdir. When I do this command it comes up with " home/My_New_Dir " Cannot create directory ’ home/My_New_Dir’ No such file or directory

(2) The command useradd –r –u 200 –g 0 Tom What does the numbers mean?

On 05/06/2012 10:36 AM, TankerInc wrote:
>
> (1) mkdir. When I do this command it comes up with " home/My_New_Dir "
> Cannot create directory ’ home/My_New_Dir’ No such file or directory

root owns the directory named /home

a fact you can prove to yourself with this code in a terminal:


ls -hal | grep home

so only root can make new directories under it…generally those
directories will be the name of user who owns that directory…so, i
guess if you look there is a /home/TankerInc (or, whatever YOUR user
name is on the system)

so, then if you are inside of /home/TankerInc (a directory you own)
then you can

mkdir My_New_Dir and then see that there is a new directory at

/home/TankerInc/My_New_Dir

and, then while in ~/TankerInc/ you do


ls -hal | grep My_N*

you will find something like:

drwxr-xr-x 2 TankerInc users 4.0K May 15 2011 My_New_Dir/

(2) The command useradd –r –u 200 –g 0 Tom What does the numbers
mean?

‘they’ say it is better to teach a man how to fish than to hand him a
fish, so:

the meaning of that number is easily learned by finding the ‘-u’ switch
in documentation here:


man useradd
info useradd

i show how to find “the books” which are included on your openSUSE
because there are some things which might (or will) vary from the paper
books you got your hands on to study–those are undoubtedly not
specific to openSUSE 12.1 (or whatever version you are running–you
didn’t say) but the “man” and “info” which are on your machine are
specific to your system…

enjoy!

dd

And while yoiu finf aboce technical explanation on your questions (ands more important how to find the answers yourself), I would like to tell you a few things about these forums.

. First welcome new forum user.

. While posting computer output in these forums, please do so between CODE tags (http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html) and do so including the prompts and the commands you use. This explains much better what you want to tell us then a story. E.g. I would post your usage of the mkdir command as follows:

henk@boven:/home> mkdir new-dir
mkdir: kan map ‘new-dir’ niet aanmaken: Toegang geweigerd
henk@boven:/home>

As you see this shows exact what the command used was (and not the shortened form in your story), what your working directory was (you did not tell that), if you were root or normal user (you did not tell that either). In short almost all information was missing in your story (and the poster above made a lot of assumptions about them). Also I have a different error from what you tell us, but copy/paste of a session between CODE tags makes your post a lot more believable.

If you, like I, use a language differing from English, you might want to post such a sessiion in it’s English form:

henk@boven:/home> LANG=C mkdir new-dir
mkdir: cannot create directory `new-dir': Permission denied
henk@boven:/home>

will do that.

First thing. Sorry I can not code the first post. Cannot seem to find the edit just yet maybe I need more sleep.
But here is my issue with it.

linux-441v:~ # mkdir /home/tanker/My_New_Dir/New_Dir
mkdir: cannot create directory `/home/tanker/My_New_Dir/New_Dir': No such file or directory

I think it is suse 12.1 also. I tried this as normal and I also tried it as root.
I am very sleepy so I hope this is enough information for you to understand the command I am trying to do.

Hi
If the first directory (parent) doesn’t exist you need to add the -p
command line option, eg;


mkdir -p /home/tanker/My_New_Dir/New_Dir

Look at the man page for mkdir;


man mkdir


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 1 day 11:01, 4 users, load average: 0.01, 0.02, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 2012-05-06 12:56, @no-mx.forums.opensuse.org wrote:
--------------------^

Would you be so kind to put a name in there? Even a false name?

Thank you.

> dd

Are you the jdd I know from the mailing lists? Or somebody else? Then your
from address in the news configuration of Thunderbird would be
dd@no-mx.forums.opensuse.org” or “jdd@no-mx.forums.opensuse.org”.

Please do it, be so kind.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-05-06 14:46, TankerInc wrote:
>
> First thing. Sorry I can not code the first post. Cannot seem to find
> the edit just yet maybe I need more sleep.

No such feature for a committed post - ie, after 10 minutes.

> But here is my issue with it.
>
>
> Code:
> --------------------
> linux-441v:~ # mkdir /home/tanker/My_New_Dir/New_Dir
> mkdir: cannot create directory `/home/tanker/My_New_Dir/New_Dir’: No such file or directory


Do:


ls -l /home
ls -l /home/tanker
ls -l /home/tanker/My_New_Dir
ls -l /home/tanker/My_New_Dir/New_Dir


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)