{"id":1895,"date":"2016-11-15T19:21:19","date_gmt":"2016-11-15T18:21:19","guid":{"rendered":"http:\/\/monodes.com\/predaelli\/?p=1895"},"modified":"2016-11-15T15:21:51","modified_gmt":"2016-11-15T14:21:51","slug":"50-most-frequently-used-unix-linux-commands-with-examples","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2016\/11\/15\/50-most-frequently-used-unix-linux-commands-with-examples\/","title":{"rendered":"50 Most Frequently Used UNIX \/ Linux Commands (With Examples)"},"content":{"rendered":"<p>Several pearl in <em><a href=\"http:\/\/www.gauravkgupta.com\/50-frequently-used-unix-linux-commands-examples\/\">50 Most Frequently Used UNIX \/ Linux Commands (With Examples)<\/a><\/em><\/p>\n<ul>\n<li>Add line number for all non-empty-lines in a file\n<pre>$ sed '\/.\/=' thegeekstuff.txt | sed 'N; s\/\\n\/ \/'<\/pre>\n<\/li>\n<li>Remove duplicate lines using awk\n<pre>$ awk '!($0 in array) { array[$0]; print }' temp\n<\/pre>\n<p>&nbsp;<\/li>\n<li>Print all lines from \/etc\/passwd that has the same uid and gid\n<pre>$awk -F ':' '$3==$4' passwd.txt\n<\/pre>\n<\/li>\n<li>Go to the 143rd line of file\n<pre>$ vim +143 filename.txt\n<\/pre>\n<p>&nbsp;<\/li>\n<li>Go to the first match of the specified\n<pre>$ vim +\/search-term filename.txt\n<\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Several pearl in 50 Most Frequently Used UNIX \/ Linux Commands (With Examples) Add line number for all non-empty-lines in a file $ sed &#8216;\/.\/=&#8217; thegeekstuff.txt | sed &#8216;N; s\/\\n\/ \/&#8217; Remove duplicate lines using awk $ awk &#8216;!($0 in array) { array[$0]; print }&#8217; temp &nbsp; Print all lines from \/etc\/passwd that has the&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2016\/11\/15\/50-most-frequently-used-unix-linux-commands-with-examples\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_members_access_role":[],"_members_access_error":""},"categories":[72,13],"tags":[],"class_list":["post-1895","post","type-post","status-publish","format-standard","hentry","category-documentations","category-gnulinux"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-uz","jetpack-related-posts":[{"id":7662,"url":"https:\/\/monodes.com\/predaelli\/2020\/10\/05\/advanced-unix-commands-to-boost-your-productivity\/","url_meta":{"origin":1895,"position":0},"title":"Advanced Unix commands to boost your productivity","author":"Paolo Redaelli","date":"2020-10-05","format":"status","excerpt":"Advanced Unix commands to boost your productivity The more you learn the better you get vi or better Vim find awk alias netstat Well, I can say that I do use them all except awk which I usually reimplement poorly using a combination of grep, sed and the like.","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11554,"url":"https:\/\/monodes.com\/predaelli\/2024\/04\/03\/how-to-replace-string-in-bash-5-methods-linuxsimply\/","url_meta":{"origin":1895,"position":1},"title":"How to Replace String in Bash? [5 Methods] &#8211; LinuxSimply","author":"Paolo Redaelli","date":"2024-04-03","format":"quote","excerpt":"In bash scripting, the replacement of string is important because it allows you to modify a variable and the text of a file. It also helps in file and text processing and to validate user input. To replace a string in bash, check the following methods: Using Parameter expansion: ${String\/pattern\/replacement}\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6661,"url":"https:\/\/monodes.com\/predaelli\/2020\/02\/09\/how-old-is-your-linux-installation\/","url_meta":{"origin":1895,"position":2},"title":"how old is your linux installation","author":"Paolo Redaelli","date":"2020-02-09","format":false,"excerpt":"I was just wondering how old is my Dell Precision. So I asked DuckDuckGo \"how old is your linux\" and it told me to to read how old is your linux installation on documentacoes.wordpess.com sudo tune2fs -l $( df -h | awk '$NF ~ \"\/$\" {print $1}' ) | grep\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8003,"url":"https:\/\/monodes.com\/predaelli\/2021\/01\/04\/5-lines-i-put-in-a-blank-vimrc-sword-and-signals\/","url_meta":{"origin":1895,"position":3},"title":"5 lines I put in a blank .vimrc | Sword and Signals","author":"Paolo Redaelli","date":"2021-01-04","format":false,"excerpt":"TL;DR To make a default Vim installation more useful, type the following 5 lines into its .vimrc file: set hlsearch \" highlight all search results set ignorecase \" do case insensitive search set incsearch \" show incremental search results as you type set number \" display line number set noswapfile\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3603,"url":"https:\/\/monodes.com\/predaelli\/2017\/12\/28\/vim-8-for-centos-linux-7\/","url_meta":{"origin":1895,"position":4},"title":"Vim 8 for CentOS Linux 7","author":"Paolo Redaelli","date":"2017-12-28","format":"link","excerpt":"Vim 8 for CentOS Linux 7 \u2013 Karanbir Singh :: Thinkability @karan.org Basically add repo https:\/\/copr.fedorainfracloud.org\/coprs\/mcepl\/vim8\/repo\/epel-7\/mcepl-vim8-epel-7.repo","rel":"","context":"In &quot;vim&quot;","block_context":{"text":"vim","link":"https:\/\/monodes.com\/predaelli\/category\/vim\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":15957,"url":"https:\/\/monodes.com\/predaelli\/2026\/08\/25\/how-to-run-gui-applications-in-docker-x11-forwarding-and-vnc\/","url_meta":{"origin":1895,"position":5},"title":"How to Run GUI Applications in Docker (X11 Forwarding and VNC)","author":"Paolo Redaelli","date":"2026-08-25","format":"link","excerpt":"How to Run GUI Applications in Docker (X11 Forwarding and VNC) How to Run GUI Applications in Docker (X11 Forwarding and VNC) Learn how to run graphical applications inside Docker containers using X11 forwarding, VNC servers, and browser-based solutions for cross-platform GUI access. Running GUI applications in Docker enables isolated\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/1895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=1895"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/1895\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=1895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=1895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=1895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}