Virajsinh

Shell_Script_OS

Oct 9th, 2017
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. ----------------------------------------------------------------------------------------
  2. man - This Command use For Manual
  3. -> man man
  4. ----------------------------------------------------------------------------------------
  5. date - Date Command use For get Date.
  6. -> man date (get manual date command)
  7. %d Day
  8. %m Month
  9. %y Year
  10. %b First 3 Character Of Month
  11. %a First 3 Character Of Day
  12. %A Full Name Of Day
  13.  
  14. Example - Aug 21 17 (Month Date Year)
  15. Commnad - date "+%b %d %y"
  16. Command - date "+R" (get time)
  17. Commnad - date "+r" (get time with AM,PM)
  18. ----------------------------------------------------------------------------------------
  19. cal - Calender Command use for get current Calendar.
  20. ->man cal (get manual cal command)
  21. -h Turns off highlighting of today.
  22.  
  23. Example - Print August 2017 Calendar
  24. Command - cal 08 12
  25. ----------------------------------------------------------------------------------------
  26. ls - list directory
  27. ->man ls (get manual ls command)
  28. -l show attribute (read,write,excute).
  29. -lh human readable with file size.
  30. -a all files view.
  31. Example - list all directory
  32. Command - ls -a
  33. ----------------------------------------------------------------------------------------
  34. cut - remove sections from each line of files
  35. ->cut -d '|' -f 2 TextFileName.txt | cat > TextFileName2.txt
  36. -d -> delimiter (sign , | : etc.)
  37. -f -> field number
  38. ---------------------------------------------------------------------------------------
  39. Table Example
  40. 1|Virajsinh|MscIT|USA
  41. ----------------------------------------------------------------------------------------
  42. chmod - chmod use for change file mode.(use for file permission)
  43. u - user
  44. g - group
  45. o - other
  46. r - read (value : 2)
  47. w - write (value : 4)
  48. x - execute (value : 1)
  49. '+' '-' use Plus minus for permission
  50. Example - Set All Permission
  51. Example - chmod 7 filename (2+4+1=7 all permission)
  52. Example - chmod u+r filename (user read file only)
  53. Example - chmod chmod u+r,g-w,o-w (use read, group not write, other not write)
  54. link - http://www.sanfoundry.com/10-practical-chmod-command-usage-examples-in-linux/
  55. ----------------------------------------------------------------------------------------
  56. grep - grep command to highlight word in text file
  57. Commnad - grep "Word" FileName.text
  58. ----------------------------------------------------------------------------------------
  59. tee - tee commnad use for another file make
  60. Example - cat OneFile.text | tee SecondFile.text
Add Comment
Please, Sign In to add comment