LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   examples of mkdir command (https://www.linuxquestions.org/questions/linux-newbie-8/examples-of-mkdir-command-4175599068/)

glenpharmd 02-05-2017 08:36 PM

examples of mkdir command
 
Could I have a few examples of the mkdir command

jkirchner 02-05-2017 08:50 PM

Gee whiz, google a little: mkdir examples

JJJCR 02-05-2017 08:56 PM

hmmm..basic 101.

mkdir - create a directory

/var/mkdir myFirstFolder (you will be able to create folder if permission allows)

create a directory "myFirstFolder" in /var directory

avoid spaces as system will create two folders for that

ex: /home/username/mkdir New Folder

above will create a folder "New" and a folder called "Folder"

check out links below:
http://www.ee.surrey.ac.uk/Teaching/Unix/
http://www.ibm.com/developerworks/li...l-lpic1-103-3/

grail 02-06-2017 03:40 AM

http://lmgtfy.com/?q=examples+of+mkdir+command

jsbjsb001 02-06-2017 04:13 AM

Quote:

Originally Posted by glenpharmd (Post 5665663)
Could I have a few examples of the mkdir command

You should start by being familiar with as many basic Linux/UNIX commands as you can. Here's one site you can start with;

https://www.google.com.au/url?sa=t&r...us0_oC0HjsjVgg

If you want some examples of mkdir (and a lot of other commands), type the following into a command-line prompt;

Code:

man mkdir
or

Code:

info mkdir
In the above example the mkdir command is used but, you can replace mkdir with most/any other commands you would like to know more about.

I would also have a look at the site jkirchner is talking about. Best of luck!

beachboy2 02-06-2017 04:30 AM

glenpharmd,

Welcome to LQ.

Here is a practical example. Letís suppose you have two hard drives and you want to use the second one as a backup drive.

You need to make a new directory (drive2):

Code:

sudo mkdir /media/drive2
Next, modify the /etc/fstab file by pasting in the copied UUID for the HDD:

Code:

gksudo gedit /etc/fstab
OR

Code:

sudo nano /etc/fstab
Then mount drive2 on partition sdb1:

Code:

sudo mount /dev/sdb1 /media/drive2
As has been advised above, use Google or DuckDuckGo.

Habitual 02-06-2017 05:23 AM

Code:

mkdir
mkdir: missing operand
Try 'mkdir --help' for more information.

Literally, in yer face.

JJJCR 02-06-2017 08:18 PM

Quote:

Originally Posted by Habitual (Post 5665773)
Code:

mkdir
mkdir: missing operand
Try 'mkdir --help' for more information.

Literally, in yer face.

Cool illustration!

Maybe Linux can create a tab completion for mkdir, if user press tab. Then system will throw an error, "creating invisible folder" user cannot find. :)

BW-userx 02-06-2017 08:32 PM

heres one
Code:

mkdir mydir

Jjanel 02-07-2017 05:05 AM

Hi glenpharmd! Welcome.
I invite you to share a little about your PC, 'distro', Linux experience/interest/goals.
(That might help LQ'ers tailor responses to your situation. Thanks. Enjoy Linux!)


All times are GMT -5. The time now is 07:55 PM.