LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2017, 08:36 PM   #1
glenpharmd
LQ Newbie
 
Registered: Dec 2016
Posts: 1

Rep: Reputation: Disabled
examples of mkdir command


Could I have a few examples of the mkdir command
 
Old 02-05-2017, 08:50 PM   #2
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 845

Rep: Reputation: 240Reputation: 240Reputation: 240
Gee whiz, google a little: mkdir examples
 
1 members found this post helpful.
Old 02-05-2017, 08:56 PM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,847

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
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/

Last edited by JJJCR; 02-05-2017 at 08:56 PM. Reason: edit
 
Old 02-06-2017, 03:40 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,804

Rep: Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069
http://lmgtfy.com/?q=examples+of+mkdir+command
 
Old 02-06-2017, 04:13 AM   #5
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,630

Rep: Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877Reputation: 1877
Quote:
Originally Posted by glenpharmd View Post
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!

Last edited by jsbjsb001; 02-06-2017 at 04:15 AM. Reason: additions
 
1 members found this post helpful.
Old 02-06-2017, 04:30 AM   #6
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 20 MATE, MX-19.3, antiX, EndeavourOS
Posts: 3,245
Blog Entries: 17

Rep: Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211
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.
 
Old 02-06-2017, 05:23 AM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
mkdir
mkdir: missing operand
Try 'mkdir --help' for more information.
Literally, in yer face.
 
Old 02-06-2017, 08:18 PM   #8
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,847

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Cool

Quote:
Originally Posted by Habitual View Post
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.
 
Old 02-06-2017, 08:32 PM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
heres one
Code:
 mkdir mydir
 
Old 02-07-2017, 05:05 AM   #10
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
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!)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Wget (Command Line Downloader) command examples LXer Syndicated Linux News 0 12-22-2016 02:12 PM
LXer: aria2 (Command Line Downloader) command examples LXer Syndicated Linux News 0 11-04-2016 02:33 PM
mkdir & cp in one command? une Linux - Software 1 03-11-2007 10:18 PM
About -p Option Of Mkdir Command George2 Linux - Software 4 04-25-2006 07:33 AM
mkdir command digitalgravy Linux - General 5 08-12-2004 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration