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…
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.
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:
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.
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)