LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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: 923

Rep: Reputation: 291Reputation: 291Reputation: 291
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: 2,095

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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,988

Rep: Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182
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,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
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 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,842
Blog Entries: 29

Rep: Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429Reputation: 1429
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: 2,095

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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 (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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: 363Reputation: 363Reputation: 363Reputation: 363
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 07:14 PM.

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