Road linux command learning

File management articles

cat command and print files connected to the standard output.

Print file test.txt, -n, -b to add line numbers, -n (including blank lines), - b (not including blank lines).

 cat -n test.txt

Test.txt append the contents inside to text2.txt inside.

 cat -b test.txt > test2.txt

Test.txt emptied the contents inside.

 cat /dev/null > test.txt

Linux rm command to delete a file or directory.

Texs.txt delete files, -f is without confirmation.

 rm -f test.txt

Delete the test folder, -r for the directory will be deleted and the following.

rm -r test

Delete all files in the current directory and directory

rm -r *
Released seven original articles · won praise 17 · views 1906

Guess you like

Origin blog.csdn.net/Y00010010/article/details/104673274