{"id":249,"date":"2009-06-23T00:27:32","date_gmt":"2009-06-22T22:27:32","guid":{"rendered":"http:\/\/netspider.com.ua\/index.php\/2009\/06\/23\/linux-101-hacks-101-xak-dlya-linuksa\/"},"modified":"2013-06-18T20:07:42","modified_gmt":"2013-06-18T18:07:42","slug":"linux-101-hacks-101-xak-dlya-linuksa","status":"publish","type":"post","link":"https:\/\/netspider.com.ua\/index.php\/2009\/06\/23\/linux-101-hacks-101-xak-dlya-linuksa\/","title":{"rendered":"&ldquo;Linux 101 hacks&rdquo; &ndash; 101 \u0445\u0430\u043a \u0434\u043b\u044f \u041b\u0438\u043d\u0443\u043a\u0441\u0430"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.netspider.com.ua\/blog\/16.jpg\" \/> <\/p>  <p>\u041d\u0430\u0440\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 (\u043f\u0440\u0430\u0432\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u043a\u0430\u0447\u0430\u043b, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \ud83d\ude42 ) \u2013 \u201c<a title=\"\u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435\" href=\"https:\/\/www.thegeekstuff.com\/book\/linux101hacks.php\" target=\"_blank\">Linux 101 hacks<\/a>\u201d.&#160; \u041a\u043d\u0438\u0433\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u201c\u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432\u201d \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Linux (\u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 *NIX).<\/p>  <p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p> <!--more-->  <blockquote>   <h6>Chapter 1: Powerful CD Command Hacks<\/h6>    <ul>     <li>Hack 1. Use CD PATH to define the base directory for cd command <\/li>      <li>Hack 2. Use cd alias to navigate up the directory effectively <\/li>      <li>Hack 3. Perform mkdir and cd using a single command <\/li>      <li>Hack 4. Use \u201ccd -\u201d to toggle between the last two directories <\/li>      <li>Hack 5. Use dirs, pushd and popd to manipulate directory stack <\/li>      <li>Hack 6. Use \u201cshopt -s cdspell\u201d to automatically correct mistyped directory names on cd<\/li>   <\/ul>    <h6>Chapter 2: Date Manipulation<\/h6>    <ul>     <li>Hack 7. Set System Date and Time <\/li>      <li>Hack 8. Set Hardware Date and Time <\/li>      <li>Hack 9. Display Current Date and Time in a Specific Format <\/li>      <li>Hack 10. Display Past Date and Time <\/li>      <li>Hack 11. Display Future Date and Time<\/li>   <\/ul>    <h6>Chapter 3: SSH Client Commands<\/h6>    <ul>     <li>Hack 12. Identify SSH Client Version <\/li>      <li>Hack 13. Login to Remote Host using SSH <\/li>      <li>Hack 14. Debug SSH Client Session <\/li>      <li>Hack 15. Toggle SSH Session using SSH Escape Character <\/li>      <li>Hack 16. SSH Session Statistics using SSH Escape Character<\/li>   <\/ul>    <h6>Chapter 4: Essential Linux Commands<\/h6>    <ul>     <li>Hack 17. Grep Command <\/li>      <li>Hack 18. Find Command <\/li>      <li>Hack 19. Suppress Standard Output and Error Message <\/li>      <li>Hack 20. Join Command <\/li>      <li>Hack 21. Change the Case <\/li>      <li>Hack 22. Xargs Command <\/li>      <li>Hack 23. Sort Command <\/li>      <li>Hack 24. Uniq Command <\/li>      <li>Hack 25. Cut Command <\/li>      <li>Hack 26. Stat Command <\/li>      <li>Hack 27. Diff Command <\/li>      <li>Hack 28. Display total connect time of users<\/li>   <\/ul>    <h6>Chapter 5: PS1, PS2, PS3, PS4 and PROMPT_COMMAND<\/h6>    <ul>     <li>Hack 29. PS1 &#8212; Default Interaction Prompt <\/li>      <li>Hack 30. PS2 &#8212; Continuation Interactive Prompt <\/li>      <li>Hack 31. PS3 &#8212; Prompt used by \u201cselect\u201d inside shell script <\/li>      <li>Hack 32. PS4 &#8212; Used by \u201cset -x\u201d to prefix tracing output <\/li>      <li>Hack 33. PROMPT_COMMAND<\/li>   <\/ul>    <h6>Chapter 6: Colorful and Functional Shell Prompt Using PS1<\/h6>    <ul>     <li>Hack 34. Display username, hostname and current working directory in the prompt <\/li>      <li>Hack 35. Display current time in the prompt <\/li>      <li>Hack 36. Display output of any command in the prompt <\/li>      <li>Hack 37. Change foreground color of the prompt <\/li>      <li>Hack 38. Change background color of the prompt <\/li>      <li>Hack 39. Display multiple colors in the prompt <\/li>      <li>Hack 40. Change the prompt color using tput <\/li>      <li>Hack 41. Create your own prompt using the available codes for PS1 variable <\/li>      <li>Hack 42. Use bash shell function inside PS1 variable <\/li>      <li>Hack 43. Use shell script inside PS1 variable<\/li>   <\/ul>    <h6>Chapter 7: Archive and Compression<\/h6>    <ul>     <li>Hack 44. Zip command basics <\/li>      <li>Hack 45. Advanced compression using zip command <\/li>      <li>Hack 46. Password Protection of Zip files <\/li>      <li>Hack 47. Validate a zip archive <\/li>      <li>Hack 48. Tar Command Basics <\/li>      <li>Hack 49. Combine gzip, bzip2 with tar<\/li>   <\/ul>    <h6>Chapter 8: Command Line History<\/h6>    <ul>     <li>Hack 50. Display TIMESTAMP in history using HISTTIMEFORMAT <\/li>      <li>Hack 51. Search the history using Control+R <\/li>      <li>Hack 52. Repeat previous command quickly using 4 different methods <\/li>      <li>Hack 53. Execute a specific command from history <\/li>      <li>Hack 54. Execute previous command that starts with a specific word <\/li>      <li>Hack 55. Control the total number of lines in the history using HISTSIZE <\/li>      <li>Hack 56. Change the history file name using HISTFILE <\/li>      <li>Hack 57. Eliminate the continuous repeated entry from history using HISTCONTROL <\/li>      <li>Hack 58. Erase duplicates across the whole history using HISTCONTROL <\/li>      <li>Hack 59. Force history not to remember a particular command using HISTCONTROL <\/li>      <li>Hack 60. Clear all the previous history using option -c <\/li>      <li>Hack 61. Substitute words from history commands <\/li>      <li>Hack 62. Substitute a specific argument for a specific command <\/li>      <li>Hack 63. Disable the usage of history using HISTSIZE <\/li>      <li>Hack 64. Ignore specific commands from the history using HISTIGNORE<\/li>   <\/ul>    <h6>Chapter 9: System Administration Tasks<\/h6>    <ul>     <li>Hack 65. Partition using fdisk <\/li>      <li>Hack 66. Format a partition using mke2fsk <\/li>      <li>Hack 67. Mount the partition <\/li>      <li>Hack 68. Fine tune the partition using tune2fs <\/li>      <li>Hack 69. Create a swap file system. <\/li>      <li>Hack 70. Create a new user <\/li>      <li>Hack 71. Create a new group and assign to an user <\/li>      <li>Hack 72. Setup SSH passwordless login in OpenSSH <\/li>      <li>Hack 73. Use ssh-copy-id along with ssh-agent <\/li>      <li>Hack 74. Crontab <\/li>      <li>Hack 75. Safe Reboot Of Linux Using Magic SysRq Key<\/li>   <\/ul>    <h6>Chapter 10: Apachectl and Httpd Examples<\/h6>    <ul>     <li>Hack 76. Pass different httpd.conf filename to apachectl <\/li>      <li>Hack 77. Use a temporary DocumentRoot without modifying httpd.conf <\/li>      <li>Hack 78. Increase the Log Level temporarily <\/li>      <li>Hack 79. Display the modules inside Apache <\/li>      <li>Hack 80. Show all accepted directives inside httpd.conf <\/li>      <li>Hack 81. Validate the httpd.conf after making changes <\/li>      <li>Hack 82. Display the httpd build parameters <\/li>      <li>Hack 83. Load a specific module only on demand<\/li>   <\/ul>    <h6>Chapter 11: Bash Scripting<\/h6>    <ul>     <li>Hack 84. Execution Sequence of .bash_* files <\/li>      <li>Hack 85. How to generate random number in bash shell <\/li>      <li>Hack 86. Debug a shell script <\/li>      <li>Hack 87. Quoting <\/li>      <li>Hack 88. Read data file fields inside a shell script<\/li>   <\/ul>    <h6>Chapter 12: System Monitoring and Performance<\/h6>    <ul>     <li>Hack 89. Free command <\/li>      <li>Hack 90. Top Command <\/li>      <li>Hack 91. Ps Command <\/li>      <li>Hack 92. Df Command <\/li>      <li>Hack 93. Kill Command <\/li>      <li>Hack 94. Du Command <\/li>      <li>Hack 95. lsof commands. <\/li>      <li>Hack 96. Sar Command <\/li>      <li>Hack 97. vmstat Command <\/li>      <li>Hack 98. Netstat Command <\/li>      <li>Hack 99. Sysctl Command <\/li>      <li>Hack 100. Nice Command <\/li>      <li>Hack 101. Renice Command<\/li>   <\/ul>    <h4>About the Author<\/h4>    <p>Ramesh Natarajan is the blogger behind <a href=\"https:\/\/www.thegeekstuff.com\/\">The Geek Stuff<\/a>. To know more about him and the site, take a look at the <a href=\"https:\/\/www.thegeekstuff.com\/about\/\">about page<\/a>.<\/p> <\/blockquote>  <p>\u0412\u044b\u043b\u043e\u0436\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u043d\u0438\u0433\u0443, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0447\u0430\u044e (\u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0430\u0432\u0442\u043e\u0440 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u0438\u0434\u0438\u0442\u0441\u044f)).<\/p>  <p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043c\u043d\u043e\u0433\u043e \u043a\u043d\u0438\u0433 \u043f\u043e OSS \u2013 <a title=\"\u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435\" href=\"https:\/\/www.linuxtopia.org\/online_books\/index.html\" target=\"_blank\">Linuxtopia<\/a>.<\/p>  <p>\u041f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f =)<\/p>","protected":false},"excerpt":{"rendered":"\u041d\u0430\u0440\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043a\u043d\u0438\u0433\u0443 (\u043f\u0440\u0430\u0432\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u043a\u0430\u0447\u0430\u043b, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \ud83d\ude42 ) \u2013 \u201cLinux 101 hacks\u201d.&#160; \u041a\u043d\u0438\u0433\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u201c\u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432\u201d \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Linux (\u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 *NIX). \u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[809,1691,200,415,1796],"class_list":["post-249","post","type-post","status-publish","format-standard","hentry","category-main","tag-book","tag-howto","tag-linux","tag-shell","tag-unix"],"_links":{"self":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":0,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts\/249\/revisions"}],"wp:attachment":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/media?parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/categories?post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/tags?post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}