{"id":1419,"date":"2009-09-28T22:36:13","date_gmt":"2009-09-29T02:36:13","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/?p=1419"},"modified":"2009-09-28T22:36:13","modified_gmt":"2009-09-29T02:36:13","slug":"check-the-top-10-linux-commands-you-cant-live-without","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/check-the-top-10-linux-commands-you-cant-live-without\/","title":{"rendered":"Check the Top 10 Linux Commands you can&#8217;t live without"},"content":{"rendered":"<p>Type the following on your cmd line (or make into an alias)<\/p>\n<pre>\ncat ~\/.bash_history | sort | uniq -c | sort -r | head\n<\/pre>\n<p>In my case they are (for this week)<\/p>\n<pre>ls\nfg\nsvnSync (script I created)\nstats_fetch; stats_display (other scripts)\ncd\ncrontab -e\nps aux | grep\nssh_map_command (another script)\npython\nemacs -nw\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Type the following on your cmd line (or make into an alias) cat ~\/.bash_history | sort | uniq -c | sort -r | head In my case they are (for this week) ls fg svnSync (script I created) stats_fetch; stats_display (other scripts) cd crontab -e ps aux | grep ssh_map_command (another script) python emacs -nw<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,30,43],"tags":[284,393,1449],"class_list":["post-1419","post","type-post","status-publish","format-standard","hentry","category-code","category-geeklife","category-linux","tag-commands","tag-favorite","tag-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-mT","jetpack-related-posts":[{"id":1457,"url":"https:\/\/www.gubatron.com\/blog\/map-commands-to-servers-via-ssh\/","url_meta":{"origin":1419,"position":0},"title":"Quick N Dirty way to Map Commands to remote servers via ssh","author":"gubatron","date":"October 10, 2009","format":false,"excerpt":"You may be running several independent but similar servers at the same time and wasting time by executing commands in all of them one by one. Wouldn't it be nice to send a command to all of them at once? or to monitor all of them at once. The following\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":564,"url":"https:\/\/www.gubatron.com\/blog\/2-linux-commands-i-always-forget\/","url_meta":{"origin":1419,"position":1},"title":"2 Linux Commands I always forget","author":"gubatron","date":"August 3, 2007","format":false,"excerpt":"ldd ldd is good when you need to know what shared dependencies has an executable file. For example. angel@mbweb1:\/bin$ ldd \/bin\/bash libncurses.so.5 => \/lib\/libncurses.so.5 (0x00002ac651098000) libdl.so.2 => \/lib\/libdl.so.2 (0x00002ac6512f4000) libc.so.6 => \/lib\/libc.so.6 (0x00002ac6514f8000) \/lib64\/ld-linux-x86-64.so.2 (0x00002ac650e7b000) ltrace \/ dtruss for mac As seen in the manual: ltrace is a program that\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":85,"url":"https:\/\/www.gubatron.com\/blog\/2-programitas-utiles-mientras-desarrollas-en-linux\/","url_meta":{"origin":1419,"position":2},"title":"2 programitas utiles mientras desarrollas en Linux","author":"gubatron","date":"December 29, 2004","format":false,"excerpt":"Para los desarrolladores que utilizan lenguajes de programacion como Perl, o PHP, a continuacion, un programita bien util. Supon que tienes un archivo .php donde tienes definidas un monton de funciones. Y no te acuerdas que funciones estaban ahi, lo mas probable es que tengas que abrir el archivo y\u2026","rel":"","context":"In &quot;Gubatron&quot;","block_context":{"text":"Gubatron","link":"https:\/\/www.gubatron.com\/blog\/category\/gubatron\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1336,"url":"https:\/\/www.gubatron.com\/blog\/compiling-ghost-white-crab-on-linux-x86_64-ubuntu-linux\/","url_meta":{"origin":1419,"position":3},"title":"Compiling Ghost White Crab on Linux x86_64 Ubuntu Linux","author":"gubatron","date":"July 26, 2009","format":false,"excerpt":"Compiling this software is usually just a matter of running 'make', but if you try to do so in Ubuntu 64bit, you'll encounter the following error on the config_test.log file skipping incompatible \/usr\/lib\/gcc\/x86_64-linux-gnu\/4.3.3\/libgcc.a when searching for -lgcc To solve this issue just do the following: apt-get install libc6-dev-i386 This makes\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":814,"url":"https:\/\/www.gubatron.com\/blog\/how-to-banunban-ips-in-linux\/","url_meta":{"origin":1419,"position":4},"title":"How to ban\/unban ips in linux","author":"gubatron","date":"May 29, 2008","format":false,"excerpt":"In case you're not an iptables guru, you might want to create a couple scripts and put em somewhere on your $PATH. I've created two scripts called ban_ip and unban_ip. Create a file called ban_ip touch ban_ip chmod +x ban_ip Edit it and copy the following code inside: #!\/bin\/bash sudo\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3989,"url":"https:\/\/www.gubatron.com\/blog\/how-to-build-your-docker-image-using-the-same-dockerfile-regardless-of-the-host-architecture\/","url_meta":{"origin":1419,"position":5},"title":"How to build your Docker image using the same Dockerfile regardless of the host architecture","author":"gubatron","date":"November 28, 2022","format":false,"excerpt":"Problem If you are now using docker on a Mac M1 (arm64 platform), you don't want to use amd64 as the architecture for your Linux Images. You could have 2 lines on your Dockerfile and comment each one depending on where you're building the image Dockerfile # Building on Apple\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/1419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=1419"}],"version-history":[{"count":0,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/1419\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=1419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=1419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=1419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}