Great UNIX Commands Tutorial for Beginners
Today, We want to share with you Great UNIX Commands Tutorial for Beginners.
In this post we will show you The Ultimate A To Z List of UNIX Commands, hear for The 100 Most Important UNIX Commands we will give you demo and example for implement.
In this post, we will learn about Most used UNIX commands with an example.
UNIX Commands Tutorial Step By Step
ls Command (list) :
- ls : list A documents
- ls -t : list A documents togethor time
- ls -s : list A document size
- ls -ls : size togethor long format
- ls -i : list A document size togethor index number
- ls -al : list A hidden documents
- ls -a : list A hidden documents
- ls -X : extension name
- ls -S : sort by document size
- ls -R : list A recursive folder tree
cd Commands (change folder) :
- cd .. : go back one step
- cd / : relocate to root folder
- cd /root/directory : absolute path of folder
- cd : relocate directly to A home folder
- cd folder1/folder2 : moving directly to folder2 inside A folder1.
- cd directory : Relative path of folder
- cd ~ : relocate to home folder
- cd ~/directory : jump from one folder to second directly
- cd ~prakash : takes to oAr user login
pwd Command (Write working folder) :
- /bin/pwd –version : Write A version of pwd Commands
- PS1=’pwd>’ : change active working folder to anything
- chmod pwd.sh : give executive permission
- nano pwd.sh : make a shell script
- pwd : Write A working folder
- type -a pwd : Write executable named pwd
mkdir Commands (make folder):
- mkdir -m 777 mine : make a new folder
- mkdir -m a=rwx dirname : set permissions
- mkdir -p /root/mine/a/b : make a specified dir.
- mkdir dirname : make a new folder
- mkdir –version : shows A version of A installed mkdir
rm Commands(rerelocate) :
- rm -f *.txt : delete all A .txt file
- rm -f pakainfo1 : delete A pakainfo1
- rm -r folder1 : delete A folder1
- rm -rf folder1 : force rerelocate A folder1
- rm -ri folder1 : delete file
- rm pakainfo1 : delete A pakainfo1
- rm pakainfo1 pakainfo2 pakainfo3 : delete A 3 documents concurrently
- rmdir folder1 folder2 folder3 : delete A 3 folders concurrently
cp Commands (copy) :
- cp *.txt folder1 : copy as well as relocate all A .txt documents to folder1
- cp -f file.txt folder1 : force file copy to folder1
- cp -i file.txt folder1 : file overwrite
- cp -r folder1 folder2 : copy folder1 to folder2
- cp -u * dirname : copy all A documents to A folder
- cp pakainfo1 pakainfo2 : copy pakainfo1 to pakainfo2
mv Commands (relocate) :
- mv *.txt dir 1 : relocate A all .txt documents to folder1
- mv folder1 folder2 : relocate A folder1 to folder2
- mv folder1/* . : relocate all documents in A subdirectory folder1 to active folder
- mv pakainfo1 ../ : relocate A pakainfo1 to A root folder
- mv pakainfo1 folder1 : relocate A pakainfo1 to A destination folder
- mv pakainfo1 pakainfo2 : rename A pakainfo1 to pakainfo2
ln Command (link) :
- ln -s pakainfo1 dirname : make a symbolic link “link” to file
- ln -s pakainfo1 pakainfo2 : make a symbolic link to a documents
- ln -s -b pakainfo1.txt pakainfo2.txt : pakainfo1.txt is renamed to pakainfo2.txt
touch Commands :
- touch -a test.txt : change file access as well as changes
- touch -c -t 12101730 test.txt : set A access as well as changes times
- touch -c test.txt : avoid creating new file
- touch -d ’14:24′ abc.txt ” : specify datetime as a string
- touch -m test.txt : change file changes time
- touch -r file leena : use time stamp of anoAr file
- touch pakainfo1 : make a new pakainfo1
- touch pakainfo1 pakainfo2 pakainfo3 : make multiple documents concurrently
- touch {1..10}{1..1000} : make 10k documents
- touch {1..20 : Create documents togethor name 1 to 10
- touch {A..N}.txt : make file togethor extension
- touch {A..Z} : make file togethor names A to Z
cat Commands (concatenate) :
- cat -e file : display $ at A EOF
- cat -n file.txt : display numbers in file
- cat /etc/passwd : display messages of file
- cat >test1 : make a file togethor cat Commands
- cat file pakainfo1 : view messages of multiple documents
- cat file.txt | less : use cat Commands togethor less option
- cat file.txt | more : use cat Commands togethor more option
- cat pakainfo1; pakainfo2 pakainfo3; : diplay multiple file messages concurrently more Commands :
- ct /etc/shells : display all A shell Commands
more Commands :
- ls | more : List A messages of A active folder togethor ls
- more +/”hope” file : starting at A first line containing A string “hope”.
- more +3 pakainfo1.txt : display A messages of pakainfo1.txt , starting at line 3
head Commands :
- head -c -7 test : to skip Writeing last N bytes
- head -c 5 test : Write A first N bytes from A file
- head -n -2 test : Skip A last N Records from A file
- head -n -41 /etc/passwd : it Writeed all A Records starting after A line 41
- head -n 10 test | tail -5 : Print A Records b/w A line numbers M as well as N
- head -n 2 /etc/passwd : Write A first 2 Records of a file
- head -n2 test : Write A first N Records from A file
- head test : Write A first 10 Records from A documents
tail Commands :
- tail -c-7 test : Write A last N bytes
- tail -f test : output A messages of file as it grows
- tail -n -41 /etc/passwd : it Writeed all A Records starting before A line 41
- tail -n 2 /etc/passwd : Write A last 2 Records of a file
- tail -n-2 test : Print A last N Records from A file
- tail -n10 test | head -5 : Print b/w A line numbers M as well as N
- tail test -n 100 : Outputs A last 100 Records of A file myfile.txt
- tail test : Write A last 10 Records of A file
Read :
Summary
You can also read about AngularJS, ASP.NET, VueJs, PHP.
I hope you get an idea about Most used UNIX commands Tutorial.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.