|
9.
|
|
|
Browse the command line history with ctrl-r and then type a few characters that you know are part of the command you are looking for.
|
|
|
type: Plain text
|
|
|
|
Для поиска ранее введенных команд по истории Bash используйте комбинацию клавиш "Сtrl+r", после введите буквы из названия команды.
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:30
|
|
10.
|
|
|
Edit the command line with cut and paste: ctrl-k for cut, and ctrl-y for paste.
|
|
|
type: Plain text
|
|
|
|
Работайте с командной строкой с помощью операций вырезки и вставки: "Ctrl+k" чтобы вырезать и "Ctrl+y" чтобы вставить.
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:33
|
|
11.
|
|
|
Reach the end-of-line with ctrl-e and the beginning of line with ctrl-a.
|
|
|
type: Plain text
|
|
|
|
Перейти в конец командной строки можно с помощью комбинации "Сtrl+e", в начало - с помощью "Сtrl+a".
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:35
|
|
12.
|
|
|
Instead of typing the user and group, if they are the same (like for www-data) you can just type the user followed by a colon: 'sudo chown -R www-data: *'
|
|
|
type: Plain text
|
|
|
|
При написании пользователя и группы, если они одинаковы (к примеру www-data), вы можете использовать только имя пользователя и двоеточие - "$ sudo chown -R www-data: *".
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:39
|
|
13.
|
|
|
Use the "which" command to find if an executable is in your path, and if it is, where you can find the file. e.g. 'which nano'
|
|
|
type: Plain text
|
|
|
|
Команда 'which' позволяет найти исполняемый файл если его местонахождение доступно для поиска. К примеру '$ which nano'.
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:42
|
|
14.
|
|
|
Instead of typing exit or closing the terminal if you want to logout you can press Ctrl+D.
|
|
|
type: Plain text
|
|
|
|
Вместо использования команды 'exit' для закрытия терминала или сессии вы можете использовать комбинацию "Ctrl+d".
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:45
|
|
15.
|
|
|
Use 'tail -f file' to watch a log file as messages get appended, and use 'tail -100 file' to change the count of lines read from the file.
|
|
|
type: Plain text
|
|
|
|
Используйте 'tail -f file' для отслеживания новых строк в log-файле, 'tail -100 file' позволяет задать количество строк для чтения из файла.
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:48
|
|
16.
|
|
|
An easy way to see what processes own which network connections: 'sudo netstat -tup' for connections and 'sudo netstat -tupl for listening process.
|
|
|
type: Plain text
|
|
|
|
Быстрый способ чтобы узнать какие процессы используют сетевые соединения: 'sudo netstat -tup' для установленных соединений и 'sudo netstat -tupl' для соединений в режиме прослушивания (LISTEN).
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:51
|
|
17.
|
|
|
The 'history' command will show you the commands you've used before. Alternatively you can use the up arrow button to look through them.
|
|
|
type: Plain text
|
|
|
|
Команда 'history' показывает команды, набранные вами ранее. Также вы можете использовать клавиши со стрелками вверх и вниз.
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:54
|
|
18.
|
|
|
To make a backup without typing the full path twice: 'cp /long/path/to/file/name{,.orig}' to create a copy with the suffix .orig
|
|
|
type: Plain text
|
|
|
|
Для создания копии файла без дублирования пути файла используйте команду '$ cp /long/path/to/file/name{,.orig}', которая создаст копию файла с суффиксом ".orig".
|
|
Translated and reviewed by
sasha
|
|
|
|
Located in
ubuntu-server-tips:57
|