Linux commands Flashcards
list
ls
remove
rm
delete empty directories/folders
rmdir
show place
pwd
create folder/directory
mkdir
create a directory under another directory
the one to create AA under director BB
mkdir AA/BB
go to XX
cd XX
go to home
cd ~
go back one step before
cd..
home
~
parent folder
..
current folder or place
.
list of history of creation and owners and rights of file X
ls -l X
root
/
edit if a XX text file exists or create it
nano XX.txt
open a temp space for a text file to name it and save it after done writing
nano
read text file XX
cat XX.text
get immediately into file ZZ that is in XX that is in home
cd ~/XX/ZZ
clear steps
clear
remove full directory XX that is not empty step by step
rm -rfi XX
move a X file or directory from A directory to B directory, while B is A’s parent directory
mv X ..
rename a file X to Z
if Z exists it’s a replacement
mv X Z
command moves all files and directories under book to the directory named manual, if manual exists. Otherwise, the directory book is renamed manual.
mv book manual
command moves intro to manual/chap1. The name intro is removed from the current directory, and the same file appears as chap1 in the directory manual.
mv intro manual/chap1
command moves file chap3 to manual/chap3
mv chap3 manual