Книга: Fedora™ Unleashed, 2008 edition
Making Directories with mkdir
Making Directories with mkdir
Making directories is as easy as it sounds, although there is one parameter you should be aware of: -p
. If you are in /home/paul
and you want to create the directory /home/paul/audio/sound
, you get an error like this:
mkdir: cannot create directory `audio/sound`: No such file or directory
At first glance, this seems wrong because mkdir
cannot create the directory because it does not exist. What it actually means is that it cannot create the directory sound
because the directory audio
does not exist. This is where the -p
parameter comes in: If you try to make a directory within another directory that does not exist, as in the previous example, -p
creates the parent directories, too. So:
$ mkdir -p audio/sound
That first creates the audio
directory and then creates the sound
directory inside it.
- Printing the Contents of a File with cat
- Changing Directories with cd
- Changing File Access Permissions with chmod
- Copying Files with cp
- Printing Disk Use with du
- Finding Files by Searching with find
- Searches for a String in Input with grep
- Paging Through Output with less
- Creating Links Between Files with ln
- Finding Files from an Index with locate
- Listing Files in the Current Directory with ls
- Reading Manual Pages with man
- Making Directories with mkdir
- Moving Files with mv
- Listing Processes with ps
- Deleting Files and Directories with rm
- Printing the Last Lines of a File with tail
- Printing Resource Usage with top
- Printing the Location of a Command with which
- mkdir
- Finding Files from an Index with locate
- Moving Files with mv
- Printing the Location of a Command with which
- Using Double Quotes to Resolve Variables in Strings with Embedded Spaces
- Drawbacks with restore
- 7. AGGREGATION WITH INDEPENDENT WORKS
- Конструкция with-do
- 3. Hexadecimal – the way we communicate with micros
- CHAPTER 3 Working with GNOME
- CHAPTER 8 Printing with Fedora
- CHAPTER 15 Remote Access with SSH