Printing files content in output cat command The “cat” command stands for concatenate. It is one of the most useful commands in Linux. This command displays file content in the output concatenates and creates files. Syntax cat [OPTION] [FILE]………… Example Cat without any options displays the file’s content in the output. If sending multiple files […]
Removing files or directories “rm” stands for remove, so as Its name shows, this command deletes files, directories, and even symbolic links- which we will cover in later lessons-. “rm” command works silently, so users must be careful using it because this command deletes files permanently and users can not restore them after deleting. Although […]
mv Command To move files or directories from a source to a destination in Linux, use the “mv” command. This command has got two functions. First, moving files or directories, and second, renaming a file or directory. It can also move multiple files or directories. “mv” command, as we explained in the “cp” command, works […]
mkdir Command In Linux, users use the “mkdir” command to create new directories. So because creating a directory is a “write” action on the parent directory, users should have the write permission on the parent directory. Users also can create multiple directories or nested directories. Syntax mkdir [option] dir-name Examples: mkdir without any options and […]
Filename As we mentioned before, In Linux, everything is a file. So every file must have a filename. A Filename in Linux is a path to the file that contains the directory name and basename. The directory name is the directory path to the file’s parent directory. The basename is the exact name of the […]
We talked about directory content list commands in the previous post and introduced the “ls” command. We will continue the last lesson here, But before that, we have to get to know special characters and their usages. Special characters In Linux, a group of characters have special meaning and act in two different ways in […]
In this lesson, we will talk about the path in Linux, which is one of the essential concepts in Linux administration. What is a Path? Every file and directory has a unique location in the Linux file system structure. To access files and directories or to call them in a command or script, Administrators need […]
date command This command displays the operating system date and time. Administrators also use this command to set the date and time; therefore, only users with root privileges can do that. By default, the date command displays the date of the current time zone. Also, the date command can show dates and times in different […]
pwd Command The “pwd” command is one of the most frequently used commands in the short form of Print Working Directory. Each time users interact with the shell, they work within a directory. So the “pwd” prints the directory that the user is currently working within. “pwd” without any options, displays the full path to […]
This post will introduce some of the basic standard Linux commands. Knowing these commands is crucial for understanding the following concepts. These basic commands are usually the same in all Linux distributions; therefore, their results are the same. We used CentOS Stream release 9. For more information about choosing distros, we suggest reading this post: […]