Here are a few Linux terminal commands that may not be as well-known but can be very useful in certain situations:
screen
: This command allows you to create and manage multiple terminal sessions within a single terminal window. This can be useful if you need to run multiple processes at the same time, or if you want to keep a process running after you close the terminal window. To start a new screen session, use the commandscreen
. To detach from a screen session and leave it running in the background, useCtrl + a
followed byd
. To reattach to a screen session, use the commandscreen -r
.watch
: This command allows you to execute a command at regular intervals and display the output on the terminal. This can be useful for monitoring the output of a command or for running a command repeatedly. For example, to run thedf -h
command every 2 seconds and display the output on the terminal, you can use the commandwatch -n 2 df -h
.awk
: This command is a powerful text processing utility that allows you to extract and manipulate data from text files. It can be used to extract specific columns from a file, perform calculations on data, and print selected output. For example, to print the second column of a file called “data.txt”, you can use the commandawk '{print $2}' data.txt
.tee
: This command allows you to redirect the output of a command to both the terminal and a file. This can be useful if you want to save the output of a command to a file while still viewing it on the terminal. For example, to run thels
command and save the output to a file called “list.txt” while also displaying it on the terminal, you can use the commandls | tee list.txt
.diff
: This command allows you to compare the contents of two files and display the differences between them. It can be useful for finding differences between two versions of a file, or for comparing the output of two different commands. For example, to compare the contents of two files called “file1.txt” and “file2.txt”, you can use the commanddiff file1.txt file2.txt
.
These are just a few examples of less well-known but useful Linux terminal commands. There are many other commands available, and you can use the man
command to view the manual pages for a specific command to learn more about its options and usage.
Schreibe einen Kommentar
Du musst angemeldet sein, um einen Kommentar abzugeben.