Основные команды

Адам Гайд, “Basic commands”, public translation into Russian from English More about this translation.

Translate into another language.

Participants

DZH1740 points
Mirray387 points
MaxPv72 points
And others...
Join Translated.by to translate! If you already have a Translated.by account, please sign in.
If you do not want to register an account, you can sign in with OpenID.
Pages: ← previous Ctrl next
1 2 3 4 5 6 7

Basic commands

Основные команды

History of edits (Latest: MaxPv 2 years, 7 months ago) §

Basic commands

Основные команды

History of edits (Latest: MaxPv 2 years, 7 months ago) §

By now you have some basic knowledge about directories and files and you can interact with the command line interface. We can learn some of the commands you'll be using many times each day. ls

Теперь у вас есть базовые знания о каталогах и файлах, и вы можете работать с интерфейсом командной строки. Мы можем изучить некоторые команды, которые вы будете использовать много раз каждый день. ls

History of edits (Latest: Mirray 2 years, 7 months ago) §

The first thing you likely need to know before you can start creating and making changes to files is what's already there? With a graphical interface you'd do this by opening a folder and inspecting its contents. From the command line you use the program ls instead to list a folder's contents.

Первое, что вам, вероятно, нужно знать, прежде чем вы начнете создавать и изменять файлы, это что же уже есть? Используя графический интерфейс, вы сделаете это, открыв каталог и проверив его содержимое. Для просмотра содержимого каталога из командной строки, вы используете программу ls.

History of edits (Latest: Mirray 2 years, 7 months ago) §

$ ls Desktop Documents Music Photos

$ ls Desktop Documents Music Photos

History of edits (Latest: MaxPv 2 years, 7 months ago) §

By default, ls will use a very compact output format. Many terminals show the files and subdirectories in different colors that represent different file types. Regular files don't have special coloring applied to their names. Some file types, like JPEG or PNG images, or tar and ZIP files, are usually colored differently, and the same is true for programs that you can run and for directories. Try ls for yourself and compare the icons and emblems your graphical file manager uses with the colors that ls applies on the command line. If the output isn't colored, you can call ls with the option --color:

По умолчанию, ls использует очень компактный формат вывода. Многие терминалы показывают файлы и поддиректории, подсвечивая их разными цветами в зависимости от типов файлов. Обычные файлы не имеют специальной подсветки, примененной к их именам. Некоторые типы файлов, например JPEG или PNG изображения, или tar и ZIP файлы, как правило, подсвечиваются различными цветами, это же верно для программ, которые вы можете запустить и для каталогов. Попробуйте выполнить ls для себя и сравнить иконки и эмблемы, использующиеся в вашем файловом менеджере с цветами, примененными к ls в командной строке. Если вывод не раскрашен, вы можете вызвать ls с опцией --color:

History of edits (Latest: DZH 2 years, 7 months ago) §

$ ls --color

$ ls --color

History of edits (Latest: artobstrel95 2 years, 7 months ago) §

man & apropos

man & apropos

History of edits (Latest: artobstrel95 2 years, 7 months ago) §

You can learn about options and arguments using another program called man (man is short for manual) like this:

Вы можете узнать о параметрах и аргументах используя другую программу, называемую man (сокращенно от маннуал) как показано ниже:

History of edits (Latest: Mirray 2 years, 7 months ago) §

$ man ls

$ man ls

History of edits (Latest: artobstrel95 2 years, 7 months ago) §

Here, man is being asked to bring up the manual page for ls. You can use the arrow keys to scroll up and down in the screen that appears and you can close it using the q key (for quit).

Здесь мы просим программу отобразить страницу мануала, посвященную команде ls. Вы можете использовать клавиши стрелок для прокрутки вверх и вниз в появившемся окне, и вы можете закрыть его используя клавишу q (для выхода).

History of edits (Latest: Mirray 2 years, 7 months ago) §

You can also use man to learn about new programs. Let's say you want to rename files using the command line but you don't know the name of the program that you can use for that. You can use another program called apropos for that, like this:

Вы также можете использовать man, чтобы узнать о новых программах. Допустим, вы хотите переименовать файлы используя командную строку, но вы не знаете название программы, которую можно для этого использовать. Для этого вы можете использовать другую команду называемую apropos, например:

History of edits (Latest: DZH 2 years, 7 months ago) §

$ apropos rename ... mv (1) - move (rename) files prename (1) - renames multiple files rename (2) - change the name or location of a file ...

$ apropos rename
...
mv (1) - move (rename) files
prename (1) - renames multiple files
rename (2) - change the name or location of a file
...

History of edits (Latest: DZH 2 years, 7 months ago) §

Here, apropos searches the manual pages that man knows about and prints commands it thinks are related to renaming. On your computer this command might (and probably will) display more information but it's very likely to include the entries shown.

Здесь, apropos осуществляет поиск по страницам мануалов, которые ему известны, а выводит на экран команды, которые, как он думает относятся к переименованию. На вашем компьютере эта команда может (и, вероятно, будет) отображать больше информации, но, весьма вероятно, будет содержать и показанные ранее команды.

History of edits (Latest: DZH 2 years, 7 months ago) §
Pages: ← previous Ctrl next
1 2 3 4 5 6 7