Here are a few Linux terminal commands that may not be as well-known but can be very useful in certain situations:

  1. 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 command screen. To detach from a screen session and leave it running in the background, use Ctrl + a followed by d. To reattach to a screen session, use the command screen -r.
  2. 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 the df -h command every 2 seconds and display the output on the terminal, you can use the command watch -n 2 df -h.
  3. 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 command awk '{print $2}' data.txt.
  4. 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 the ls command and save the output to a file called “list.txt” while also displaying it on the terminal, you can use the command ls | tee list.txt.
  5. 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 command diff 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.


Kommentare

Schreibe einen Kommentar