Explain the most useful commands in Linux

COPY file:

cp [source file]  [destination path]

Cut & Paste and Rename

mv [source file]  [destination path]

Find the any word in file:

Grep (Global Regular Expression Print )

 grep <word> <file path>

more <file path>

less <file path>

head <filepath> (top 10 lines)

head -3 <filepath>(top 3 lines )

tail <file path> (bottom 10 lines)

tail -3 <file path> (bottom 3 lines)

Sorting order display content of inside file

 sort <filename>

Leave a Reply

Your email address will not be published.