Any Linux user that has spent enough time with the command line will eventually run into a scenario where they would like to redirect standard output and/or standard error to a file (or multiple files) as well as the terminal at the same time. For something so trivial, surely there’s a way to send our output to both places at the same time. And this is exactly what the tee command in Linux is used for.
Commands
tail command in Linux with examples
The tail command in Linux is one of the most essential commands you’ll need when viewing text files. If you’re a beginner to using the command line, the tail command is a good one to learn, along with the head command, which is sort of its opposite counterpart. tail is used to print the last 10 lines of multiple files or a specified file. tail, with it’s interesting and convenient functions, can be used to monitor changes that are made to files.
od command in Linux with examples
The od command in Linux is used to dump files in octal and other formats, including hexadecimal, decimal, and ASCII. This can be handy when you need to view files that aren’t ordinarily human readable, such as a binary file that’s already been compiled. But it can also prove useful in a slew of other, admittedly niche, scenarios.
tar command in Linux with examples
The tar command creates the tar file type is used to combine multiple files into a single archive. Tar actually means “tape archive,” because tar’s original purpose was to be used on tape backups – that should tell you how old this format is. Linux systems still use the tar format, and it continues to enjoy widespread use to this day.
ssh command in Linux with examples
The ssh command in Linux is used to manage remote systems. Ordinarily, this would be another Linux system, but it could also be a firewall, router, or even a different operating system entirely. Using the ssh command to remotely log into another system will give you a command line terminal that you can fully access as if you were physically in front of the machine.
scp command in Linux with examples
The scp command in Linux is used to copy files and directories to or from a remote system. It works very similarly to the cp command, except that it copies files to or from other systems that are either on your local network or somewhere over the internet.
rm command in Linux with examples
ls command in Linux with examples
The ls command in Linux is one of the most essential commands that every Linux user should know. If you’re a beginner to using the command line, ls is probably the first command you should try to learn. ls is short for list, and is used to list the files in your present working directory or some other directory if you specify one.
uname command in Linux with examples
The uname command in Linux is one of the frequently used commands. On Linux systems, there are a multitude of commands that can be used to print system information. We cover many of these commands in our guide about getting to know the hardware of your Linux box. One such command would be uname, which is especially good for listing information about the operating system itself and the Linux kernel that is running.
usermod command in Linux with examples
The usermod command in Linux is used to modify user accounts. In particular, it’s used for changing various attributes for accounts that are already created, since a separate command is used when creating a brand new account on Linux.
yes command in Linux with examples
The yes command in Linux will automatically output a “y” or any string you specify, repeatedly. It’s one of the simplest commands on Linux, and one that most users will find they never have much use for. But then when you do need it, you’ll be thankful that your Linux system already includes this Linux command by default.