Site Overlay

File commands on Linux

File commands on Linux

Ls-a/etc
CommandParameterargument
 All means you can print everything on the screen, including hidden filesindex

Command: ls -a/etc

This command shows everything including hidden files under the etc directory.

TOUCHThe 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.
 
ECHOThis 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
CATThe 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

 
HEADIf 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


 
TAILIf 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


 
MOREIf 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 processExample command 5:
more STAFF LIST


 
 
PwdIndicates which directory it is in.
Example command: pwd
  
LsPrints 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.
 
GREPFind the text ARİF AKYÜZ from the PERSONNEL LIST .txt for example to display the content in a filecat PERSONNEL LIST | grep ARIF AKYÜZ| ability to use multiple communes in a row
MKDIRCreate index (klsör) command.The example command
creates a folder named 1:mkdir ARIF AKYÜZ
Description:
"ARIF AKYÜZ".
 
RM/RMDIRRMDIR:
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".
 
CpCopy a fileSample 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.

 
MvMove a fileSample 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.
 
FINDFile search, slowExample command 1:
find ARIF AKYÜZ/
 
LOCATEFile search, fasterExample command 1:
locate ARIF AKYÜZ/
 
Arif Akyüz
Senior Information Technologies System and Network Specialist
© 2024 Arif Akyüz. Tüm Hakları Saklıdır. Gizlilik politikası
Yasal Uyarı: Bu sitede yer alan makaleler bilgi amaçlıdır ve hatalar içerebilir. Site sahibi, bu bilgilerin kullanımı sonucunda oluşabilecek zararlardan sorumlu tutulamaz.