на главную | войти | регистрация | DMCA | контакты | справка | donate |      

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


моя полка | жанры | рекомендуем | рейтинг книг | рейтинг авторов | впечатления | новое | форум | сборники | читалки | авторам | добавить



4.3.1.7. Creating and removing directories from the command line

To create a directory from the command line, use the mkdir command:

$ mkdir newdirectory


This will create newdirectory in the current working directory. You could also specify the directory name using an absolute or relative-to-home pathname.

To create a chain of directories, or a directory when one or more of the parent directories might not exist, use the -p (path) option:

$ mkdir -p foo/bar/baz/qux


This has the side effect of turning off any warning messages if the directory already exists.

To delete a directory that is empty, use rmdir :

$ rmdir newdirectory


This will fail if the directory is not empty. To delete a directory as well as all of the directories and files within that directory, use the rm (remove) command with the -r (recursive) option:

$ rm -r newdirectory

rm -r can delete hundreds or thousands of files without further confirmation. Use it carefully!


4.3.1.6. Displaying and changing the current working directory | Fedora Linux | 4.3.1.8. Copying files