Tagged: 143 Basic UNIX Commands with Examples

Great UNIX Commands Tutorial for Beginners 0

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

Great UNIX Commands Tutorial for Beginners - Great UNIX Commands Tutorial for Beginners

Great UNIX Commands Tutorial for Beginners

ls Command (list) :

  1. ls : list A documents
  2. ls -t : list A documents togethor time
  3. ls -s : list A document size
  4. ls -ls : size togethor long format
  5. ls -i : list A document size togethor index number
  6. ls -al : list A hidden documents
  7. ls -a : list A hidden documents
  8. ls -X : extension name
  9. ls -S : sort by document size
  10. ls -R : list A recursive folder tree

cd Commands (change folder) :

  1. cd .. : go back one step
  2. cd / : relocate to root folder
  3. cd /root/directory : absolute path of folder
  4. cd : relocate directly to A home folder
  5. cd folder1/folder2 : moving directly to folder2 inside A folder1.
  6. cd directory : Relative path of folder
  7. cd ~ : relocate to home folder
  8. cd ~/directory : jump from one folder to second directly
  9. cd ~prakash : takes to oAr user login

pwd Command (Write working folder) :

  1. /bin/pwd –version : Write A version of pwd Commands
  2. PS1=’pwd>’ : change active working folder to anything
  3. chmod pwd.sh : give executive permission
  4. nano pwd.sh : make a shell script
  5. pwd : Write A working folder
  6. type -a pwd : Write executable named pwd

mkdir Commands (make folder):

  1. mkdir -m 777 mine : make a new folder
  2. mkdir -m a=rwx dirname : set permissions
  3. mkdir -p /root/mine/a/b : make a specified dir.
  4. mkdir dirname : make a new folder
  5. mkdir –version : shows A version of A installed mkdir

rm Commands(rerelocate) :

  1. rm -f *.txt : delete all A .txt file
  2. rm -f pakainfo1 : delete A pakainfo1
  3. rm -r folder1 : delete A folder1
  4. rm -rf folder1 : force rerelocate A folder1
  5. rm -ri folder1 : delete file
  6. rm pakainfo1 : delete A pakainfo1
  7. rm pakainfo1 pakainfo2 pakainfo3 : delete A 3 documents concurrently
  8. rmdir folder1 folder2 folder3 : delete A 3 folders concurrently

cp Commands (copy) :

  1. cp *.txt folder1 : copy as well as relocate all A .txt documents to folder1
  2. cp -f file.txt folder1 : force file copy to folder1
  3. cp -i file.txt folder1 : file overwrite
  4. cp -r folder1 folder2 : copy folder1 to folder2
  5. cp -u * dirname : copy all A documents to A folder
  6. cp pakainfo1 pakainfo2 : copy pakainfo1 to pakainfo2

mv Commands (relocate) :

  1. mv *.txt dir 1 : relocate A all .txt documents to folder1
  2. mv folder1 folder2 : relocate A folder1 to folder2
  3. mv folder1/* . : relocate all documents in A subdirectory folder1 to active folder
  4. mv pakainfo1 ../ : relocate A pakainfo1 to A root folder
  5. mv pakainfo1 folder1 : relocate A pakainfo1 to A destination folder
  6. mv pakainfo1 pakainfo2 : rename A pakainfo1 to pakainfo2

ln Command (link) :

  1. ln -s pakainfo1 dirname : make a symbolic link “link” to file
  2. ln -s pakainfo1 pakainfo2 : make a symbolic link to a documents
  3. ln -s -b pakainfo1.txt pakainfo2.txt : pakainfo1.txt is renamed to pakainfo2.txt

touch Commands :

  1. touch -a test.txt : change file access as well as changes
  2. touch -c -t 12101730 test.txt : set A access as well as changes times
  3. touch -c test.txt : avoid creating new file
  4. touch -d ’14:24′ abc.txt ” : specify datetime as a string
  5. touch -m test.txt : change file changes time
  6. touch -r file leena : use time stamp of anoAr file
  7. touch pakainfo1 : make a new pakainfo1
  8. touch pakainfo1 pakainfo2 pakainfo3 : make multiple documents concurrently
  9. touch {1..10}{1..1000} : make 10k documents
  10. touch {1..20 : Create documents togethor name 1 to 10
  11. touch {A..N}.txt : make file togethor extension
  12. touch {A..Z} : make file togethor names A to Z

cat Commands (concatenate) :

  1. cat -e file : display $ at A EOF
  2. cat -n file.txt : display numbers in file
  3. cat /etc/passwd : display messages of file
  4. cat >test1 : make a file togethor cat Commands
  5. cat file pakainfo1 : view messages of multiple documents
  6. cat file.txt | less : use cat Commands togethor less option
  7. cat file.txt | more : use cat Commands togethor more option
  8. cat pakainfo1; pakainfo2 pakainfo3; : diplay multiple file messages concurrently more Commands :
  9. ct /etc/shells : display all A shell Commands

more Commands :

  1. ls | more : List A messages of A active folder togethor ls
  2. more +/”hope” file : starting at A first line containing A string “hope”.
  3. more +3 pakainfo1.txt : display A messages of pakainfo1.txt , starting at line 3

head Commands :

  1. head -c -7 test : to skip Writeing last N bytes
  2. head -c 5 test : Write A first N bytes from A file
  3. head -n -2 test : Skip A last N Records from A file
  4. head -n -41 /etc/passwd : it Writeed all A Records starting after A line 41
  5. head -n 10 test | tail -5 : Print A Records b/w A line numbers M as well as N
  6. head -n 2 /etc/passwd : Write A first 2 Records of a file
  7. head -n2 test : Write A first N Records from A file
  8. head test : Write A first 10 Records from A documents

tail Commands :

  1. tail -c-7 test : Write A last N bytes
  2. tail -f test : output A messages of file as it grows
  3. tail -n -41 /etc/passwd : it Writeed all A Records starting before A line 41
  4. tail -n 2 /etc/passwd : Write A last 2 Records of a file
  5. tail -n-2 test : Print A last N Records from A file
  6. tail -n10 test | head -5 : Print b/w A line numbers M as well as N
  7. tail test -n 100 : Outputs A last 100 Records of A file myfile.txt
  8. 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.