简体   繁体   中英

How to create a working directory using mkdir command in Mac OS X?

I started learning python recently and I am very new to programming.

My book tells the following :

On Unix-based systems (including Mac OS X and Linux), your working directory might be in /usr/home and be created by a mkdir command in a shell window or file explorer GUI specific to your platform, but the same concepts apply. The Cyg- win Unix-like system for Windows is similar too, though your directory names may vary (/home and /cygdrive/c are candidates).

I am running python on a Mac OS X and I am finding hard to create a directory.

What code should I type in the Terminal ?

I tried :

  1. mkdir

It says :usage: mkdir [-pv] [-m mode] directory ...

  1. cd c: mkdir

It outputs : -bash: cd: c:: No such file or directory

Please help me

Thanks

mkdir mydir creates a directory called mydir ; then you could change directory like cd mydir . To get further information you could check out the man page for mkdir using man mkdir from your terminal. I'm not really sure what you mean with working directory . The pwd command prints out the current working directory, ie the directory you are currently standing in. – Cyclone

For making directory in mac use below command:

mkdir nameOfDir

If you want to check directory then use below command:

cd nameOfDir

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM