File commands on Linux
Ls | -a | /etc |
Command | Parameter | argument |
All means you can print everything on the screen, including hidden files | index |
Command: ls -a/etc
This command shows everything including hidden files under the etc directory.
TOUCH | The command is to create a file. The files created with this command are formed under the directory where you created the command. | Example command: touch ARİF AKYÜZ Description:An empty file without an extension named "ARİF AKYÜZ" is formed, something can be written into this file as .txt. | |
ECHO | This command modifies the contents of an existing file or .txt, html, and so on. | Example command 1: echo JON SNOW> ARİF AKYÜZ Description: Deletes the information in the "ARİF AKYÜZ" file and writes "JON SNOW" on it. Sample command 2 :echo JON SNOW >> ARIF AKYÜZ Description: "ARIF AKYÜZ" writes "JON SNOW" to the bottom line without deleting the existing information in the file. | > Redirect means >> redirect to add something to the content without crushing what exists |
CAT | The contents of the .txt file can be viewed and changed by using the CAT command on the terminal. | Example command 1 :cat Arif Akyüz Description: If something is written in the "ARIF AKYÜZ" file we created above, it will press it on the screen. Example command 2 :cat PERSONNEL LIST Description: If there is a list of .txt etc. named "PERSONNEL LIST" under the current directory, all the information in it is printed on the screen | |
HEAD | If there is a list of .txt etc. named "PERSONNEL LIST" under the current directory, it prints only the information in the first 8 lines, not all the information in it. | Example command 3: HEAD STAFF LIST | |
TAIL | If there is a list of .txt etc. named "PERSONNEL LIST" under the current directory, it prints only the information in the last 8 lines, not all the information in it. | Example command 4: tail STAFF LIST | |
MORE | If there is a list of .txt etc. named "PERSONNEL LIST" under the current directory, all the information in it is printed on the screen, but as you press ENTER to read slowly, the lines load downwards. ctrl+c exits the process | Example command 5: more STAFF LIST | |
Pwd | Indicates which directory it is in. Example command: pwd | ||
Ls | Prints the files and folders in the current directory on the screen. | The example command presses the 1:ls Description: Except for hidden files screen. Example Command 2 : ls -a Description: Prints everything including hidden files. | |
GREP | Find the text ARİF AKYÜZ from the PERSONNEL LIST .txt for example to display the content in a file | cat PERSONNEL LIST | grep ARIF AKYÜZ | | ability to use multiple communes in a row |
MKDIR | Create index (klsör) command. | The example command creates a folder named 1:mkdir ARIF AKYÜZ Description: "ARIF AKYÜZ". | |
RM/RMDIR | RMDIR: Delete existing or Newly Created directories(folders) command RM: Delete existing or Newly Created files | The sample command deletes the folder 1:rmdir ARIF AKYÜZ Description: "ARIF AKYÜZ". The sample command deletes the file 2:rm ARIF AKYÜZ Description: "ARIF AKYÜZ". | |
Cp | Copy a file | Sample command copies 1 :cp ARİF AKYÜZ Description:Arif AKYÜZ file Sample command 2 :cp -r Dowloands/ ARİF AKYÜZ Description: Downlands kver copies into ARIF AKYÜZ folder. | |
Mv | Move a file | Sample command 1 :cp ARIF AKYÜZ Description:Arif AKYÜZ moves the file Example command 2 :cp -r Dowloands/ ARIF AKYÜZ Description: Downlands moves the kver into the ARIF AKYÜZ folder. | |
FIND | File search, slow | Example command 1: find ARIF AKYÜZ/ | |
LOCATE | File search, faster | Example command 1: locate ARIF AKYÜZ/ |
Senior Information Technologies System and Network Specialist