Linux Basic Commands
Making a new file (test1.txt)
root@ittihack:~# touch test1.txt
Making a new Directory ( TEST ) root@ittihack:~# mkdir TEST
Listing files from the current folder
root@ittihack:~# ls
Listing files from a specific folder
root@ittihack:~# ls /home/videos
Listing files with their authentications from the current folder
root@ittihack:~# ls -la
Listing files with their authentications from a specific folder
root@ittihack:~# ls -la /home/videos
Where am I ? ( print working directory )
root@ittihack:~# pwd
Entreing directory
root@ittihack:~# cd
appendices;
cd / --> root directory
cd .. --> one folder back
cd ../../ --> two folders back
cd~ --> go home directory
Copying
root@ittihack:~# cp test1.txt /home/documents
Copying with editing the name
root@ittihack:~# cp test1.txt /home/documents/test2.txt
Removing
root@ittihack:~# rm /home/documents/test1.txt
Moving
root@ittihack:~# mv /home/documents/test2.txt /home/MyFiles
Searching
root@ittihack:~# locate text2.txt
Reading a file
root@ittihack:~# cat /home/MyFiles/test2.txt
Editing a file
root@ittihack:~# nano /home/MyFiles/test2.txt
Showing process status
root@ittihack:~# ps
Archiving
root@ittihack:~# tar -cvf file.tar /directory
Extraxting
root@ittihack:~# tar -xvf file.tar
root@ittihack:~# unzip file.tar
root@ittihack:~# gzip -d file.tar.gz
0 comments:
Post a Comment