Below are details of Basic Commands
Command | Description |
---|---|
date | date command is used to print or set the system date and time. Syntax: date options |
cal | cal displays a simple calendar. If arguments are not specified, the current month is displayed. Syntax: cal options |
clear | clear the terminal screen |
pwd | pwd command is used to print name of working directory |
uname | print system information. Generally used to know the flavor and version of the operating system |
who | show who is logged on |
uptime | Tell how long the system has been running. |
ls | If you simply execute ls on the command prompt, then it will display the files and directories in the current directory.You can pass a directory as an argument to ls command. In this case, the ls command prints all the files and directories in the specific directory you have passed.Syntax: ls directory |
touch | The touch command simply creates an empty file. The below touch command creates a file_name.txt in the current directory.Syntax: touch file_name.txt |
cat | The cat command is used to display the contents in a file. Syntax: cat file_name.txt |
head | The head command can be used to print the specified number of lines from the starting of a file. Syntax: head -3 file_name.txt |
tail | The tail command can be used to print the specified number of lines from the end of a file. Syntax: tail -3 file_name.txt |
mkdir | The mkdir command is used to create the specified directory. |
cd | The cd command can be used to change from one directory to another directory. You need to specify the target directory where you want to go. |
mv | The mv command is used to rename the files and it also used for moving the files from one directory into another directory. |
cp | The cp command is used to copy the content of source file into the target file. If the target file already have data, then it will be overwritten. |
rmdir | remove or delete directories. Syntax: rmdir directory_name |
wc | wc command can be used to find the number of line, words and characters in a file. |
cut | cut remove sections from each line of files. Syntax: cat new_file.txt|cut -c1 |
man | If you want to know more about all above command then go to man comman Syntaxman command_name. |
No comments:
Post a Comment