{"id":4761,"date":"2012-09-23T14:23:14","date_gmt":"2012-09-23T18:23:14","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=4761"},"modified":"2012-09-23T14:23:14","modified_gmt":"2012-09-23T18:23:14","slug":"ten-things-i-wish-i-knew-earlier-about-the-linux-command-line","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/","title":{"rendered":"Ten things I wish I knew earlier about the Linux command line"},"content":{"rendered":"<p>From <a href=\"http:\/\/tuts.pinehead.tv\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/tuts.pinehead.tv\/<\/a><\/p>\n<p>We all learn new things over time as we use applications with a vast amount of possibilities. Of course, some of those things would have been so useful if we had known them earlier. Here are 10 command line tricks that I wish I had learned much sooner.<\/p>\n<p>Note: these tricks apply to bash, which is the default shell on most Linux systems. If you\u2019re using a different shell, they may not work for you. If you don\u2019t know which shell you have, it\u2019s probably bash, so go ahead and try them!<\/p>\n<p><!--more--><br \/>\n<strong>1.) Ctrl+U and Ctrl+Y.<\/strong><\/p>\n<p>Do you know that moment when you\u2019re typing a long command, and then suddenly realize you need to execute something else first? Especially when working over an SSH connection, when you can\u2019t easily open a second terminal on the same machine, this can be very annoying. Solution: ensure your cursor is at the end of your current command (shortcut: Ctrl+E), press Ctrl+U to get a clean line, type the other command you need to execute first, execute it, then press Ctrl+Y and voila! Your long command is back on the line. No mouse needed for copying, just quick hotkeys.<\/p>\n<p><strong>2.) Ctrl+R.<\/strong><\/p>\n<p>Speaking of long commands: when you need a previously used command again but don\u2019t want to retype it because it\u2019s long or complex, there\u2019s a good chance it\u2019s stored in your history file. The quickest way to retrieve and execute it is to press Ctrl+R and type a few characters that are part of your command. For example:<\/p>\n<p><code>for pid in $(pidof plugin-container); do file \/proc\/\u201d$pid\u201d\/fd\/* |<br \/>\nfgrep \/tmp\/Flash | cut -d: -f1 | xargs mplayer; done<\/code><\/p>\n<p>Now that\u2019s a command that I wouldn\u2019t like to type every time I use it. It\u2019s a one-liner to play the temporary media files Flash secretly stores when you play, for example, a YouTube movie. When I want to execute this monster, I only type the following:<\/p>\n<p>Ctrl+R<br \/>\n\u201cpidof\u201d<br \/>\nEnter<\/p>\n<p>The stuff between quotes is literally typed, as in I press p, then i, and so on. The reason this works is that I almost never use the pidof command except in this one-liner, so the most recent command executed that contains \u201cpidof\u201d is almost always the right one. However, suppose I did recently execute a different command containing \u201cpidof\u201d. By repeatedly pressing Ctrl+R after typing \u201cpidof\u201d but before pressing Enter, I can cycle through the list of commands until I hit the one I meant to execute, and then press Enter. And, last but not least, you can still edit the command you found using Ctrl+R before hitting Enter; just press the right or left arrow to get out of the history search mode, and edit away!<\/p>\n<p><strong>3.) The screen command.<\/strong><\/p>\n<p>When working over an ssh connection, commands that take long to execute can seriously get in your way. You have to keep the connection open to allow the command to complete, which means that you can\u2019t turn off your computer, and you can\u2019t execute a different command without opening a second ssh connection or (temporarily) terminating the running command. Both annoyances melt away when you use screen.<\/p>\n<p>The screen command allows you to run multiple terminal sessions inside a single terminal session, and manage the multiple sessions using hotkeys. Try it! Just execute \u201cscreen\u201d in your terminal (install it first if necessary) and see an empty terminal opening. Now execute the command \u201csleep 9999?. This will take quite long and block your terminal. However, if you press Ctrl+A, let go of the keys, and then press C, you will get a fresh new terminal ready to take commands. The sleep command on the other terminal keeps running without being interrupted. To cycle between the two open terminals, use Ctrl+A N for next and Ctrl+A P for previous (remember to let go of all keys after pressing Ctrl+A). Finally, to shut down screen without interrupting the commands that are running, press Ctrl+A D for detach. You will return to your original terminal, and if it\u2019s an ssh session, you can exit it without interrupting the commands running in screen. To get back to the screen terminals you opened before, execute \u201cscreen -R\u201d for reattach. To exit a screen session, just exit all terminals in it as you would normally exit terminals (Ctrl+D).<\/p>\n<p>For more information about screen, read its man page by executing \u201cman screen\u201d. It\u2019s a very powerful tool that even allows multiple people to use a single terminal at the same time!<\/p>\n<p><strong>4.) The xargs command.<\/strong><br \/>\nWhenever you want to execute a command on multiple files, or for every line of a certain file, xargs is the first tool to look at. Here\u2019s an example:<\/p>\n<p><code>find . -iname \u2018*.php\u2019 -print0 | xargs -0 svn add<\/code><\/p>\n<p>Anyone who has ever worked with a version control system like svn probably knows the annoyance of having to svn add every newly created code file after a few hours of editing. This command does it for you in an instant. How does it work?<\/p>\n<p><code>find . -iname *.php -print0<\/code><br \/>\nprints all files in the current directory (\u201c.\u201d) or its subdirectories that end in .php (case-insensitive) and separates them by null characters (\u201c-print0?). The null character is never used in filenames, while a newline may be, so it is safer to separate by null characters.<br \/>\n\u201cxargs -0 svn add\u201d receives the output of find on its standard input through the pipe (\u201c|\u201d), separates it by null characters (\u201c-0?) and feeds the filenames as arguments to svn, after the \u201cadd\u201d argument. It minds the limits the system imposes on the amount and size of command line arguments, and will run svn multiple times as necessary while still invoking it as few times as possible.<br \/>\nTo find out more about xargs, read the man page by executing \u201cman xargs\u201d. Using xargs is safer and more versatile than using the -exec option of find. For ultimate versatility, however, use the slightly less elegant for loop, which is described in the second part of this list.<\/p>\n<p><strong>5.) Using bash as a simple calculator.<\/strong><\/p>\n<p>Sometimes you need to quickly do a calculation that is too large or too important to do using your head. When you\u2019re working in a graphic environment, you might just fire up kcalc or gcalctool, but tools like that may not always be available or easy to find. Fortunately, you can do basic calculations within bash<br \/>\nitself. For example:<br \/>\n<code><br \/>\necho $((3*37+12)) # Outputs 123<br \/>\necho $((2**16-1)) # Two to the power of sixteen minus one; outputs 65535<br \/>\necho $((103\/10)) # Outputs 10, as all these operations are integer<br \/>\narithmetic<br \/>\necho $((103%10)) # Outputs 3, which is the remainder of 103 divided by<br \/>\n10<br \/>\n<\/code><\/p>\n<p>The $((something))-syntax also allows bitwise operations, and as such it interprets the caret (\u201c^\u201d) as a bitwise operator. That\u2019s why \u201c**\u201d is used for \u201cto the power of\u201d. The syntax also supports showing the decimal equivalent of a hexadecimal or octal number. Here\u2019s an example:<br \/>\n<code><br \/>\necho $((0xdeadbeef)) # Outputs 3735928559<br \/>\necho $((0127)) # Outputs 87<br \/>\n<\/code><\/p>\n<p>For more information, read the bash man page using \u201cman bash\u201d and search (using the \/ key) for \u201carithmetic evaluation\u201d. If you want to do floating point calculations, you can use bc (might need to install first):<br \/>\n<code><br \/>\necho \u2018scale=12; 2.5*2.5? | bc # Outputs 6.25<br \/>\necho \u2018scale=12; sqrt(14)\u2019 | bc # Outputs 3.741657386773<br \/>\n<\/code><\/p>\n<p>Note the setting of the scale variable. Using bc, you can perform floating point operations with any precision you like. The scale variable controls the amount of decimals behind the dot that are calculated. I used 12 here because kcalc uses that amount by default, but you can increase or decrease it as you like. Find out more about what bc can do by executing \u201cman bc\u201d. It even supports more advanced mathematical functions, such as the arctangent or the natural logarithm.<\/p>\n<p><strong>6.) Quoting.<\/strong><\/p>\n<p>To allow you to write awesome scripts, bash attaches a special meaning to many characters (like * &#038; ; | { ! < [ # and a lot more). Sometimes, however, these characters are not to be interpreted in any special way, but just to be passed unmodified to some command. A commonly used example:\n\n<code>find . -iname &#8216;*.conf&#8217;<\/p>\n<p>Notice the single quotes around &#8220;*.conf&#8221;. What if I forgot those? Bash would interpret the *.conf as a glob expression and expand it to all files ending in .conf in the current directory. This could prevent find from looking for all .conf files in subdirectories, causing unexpected results. Therefore, it&#8217;s a good habit to always quote anything that might contain special characters.<\/p>\n<p>Note that only single quotes prevent every character from being interpreted; double quotes still allow bash to interpret some characters. When working with variables, double quotes come in handy to prevent word splitting. This is often used in scripting. An example:<br \/>\n<code><br \/>\n#!\/bin\/bash<br \/>\n# This script renames a file to lowercase<br \/>\nnewname=\"$(echo -n \"$1\" | tr '[A-Z]\u2018 \u2018[a-z]\u2018)\u201d<br \/>\nmv -i \u201c$1? \u201c$newname\u201d<br \/>\n<\/code><\/p>\n<p>You can see quite a lot of double quotes in this script, and all of them are necessary to prevent trouble with certain filenames. You see, when a filename contains whitespace, bash splits the name on that whitespace when you leave variables unquoted. Suppose you have a file named \u201cspaced name.txt\u201d, you put it in a variable (\u201cfilename=\u2019spaced name.txt\u2019\u201d), and then you try to move it to \u201cunspacedname.txt\u201d by executing \u201cmv $filename unspacedname.txt\u201d. You\u2019ll get the error \u201cmv: target `unspacedname.txt\u2019 is not a directory\u201d. This is because mv gets executed like this: \u201cmv spaced name.txt unspacedname.txt\u201d. In other words, mv will try to move two files, \u201cspaced\u201d and \u201cname.txt\u201d to \u201cunspacedname.txt\u201d, and fail because moving multiple files to a single destination is only allowed when the destination is a directory. Putting double quotes around \u201c$filename\u201d solves this issue.<\/p>\n<p>So you see, quoting is a good habit to prevent your commands and scripts from doing unexpected things. Two final notes: you can\u2019t quote variables using single quotes, because the dollar sign loses its special meaning between single quotes, and if you ever need to use a literal single quote in some command, you can do so by putting it between double quotes. Using \\\u2019 between single quotes will not work, because even the backslash it not interpreted between single quotes.<\/p>\n<p><strong>7.) For loops.<\/strong><\/p>\n<p>Using xargs, you can run a command on a list of files. However, sometimes you\u2019ll want to use more advanced functionality of bash on a list of files. For example, you might want to set up a pipe of commands, like this:<\/p>\n<p># Count the number of while loops in each of the php files in the<br \/>\ncurrent directory<br \/>\n<code>for file in .\/*.php; do echo -n \u201c$file\u201d:\\ ; grep \u2018while\u2019 \u201c$file\u201d | wc<br \/>\n-l; done<br \/>\n<\/code><\/p>\n<p>Let me explain what happens there part by part:<\/p>\n<p><em>\u201cfor file in .\/*.php\u201d: make a list of all the files ending in \u201c.php\u201d in the current directory, and for each of them, run the following code with the variable \u201c$file\u201d set to the filename.<\/em><\/p>\n<p><em>\u201cdo \u2026 done\u201d: indicates the beginning and end of the code inside the for loop. Note that both of them have to start on a new line, which is why the semicolons are there. They count for starting a new line.<\/em><\/p>\n<p><em>\u201cecho -n \u201c$file\u201d:\\ \u201c: print the filename, followed by a colon and a space, but not a newline (the \u201c-n\u201d option suppresses the default extra newline). The backslash makes sure the space is actually printed and not eaten away by bash.<\/em><\/p>\n<p><em>\u201cgrep \u2018while\u2019 \u201c$file\u201d | wc -l\u201d: grep reads the file and prints only the lines containing the word \u201cwhile\u201d. These lines are piped to<br \/>\n\u201cwc -l\u201d, which counts the amount of lines (word count with option lines).<\/em><\/p>\n<p>As you can see, you can easily place multiple commands within the for loop; every bit of code between \u201cdo\u201d and \u201cdone\u201d is executed for every file. Imagine the possibilities, especially when you get to know more of the built-in bash functionality. Read on for an example of that.<\/p>\n<p><strong>8.) String manipulation.<\/strong><br \/>\nThere comes a time in the life of every serious bash user when some string manipulation is needed. For example, you might have a number of photos of which the filenames start with \u201cDSC\u201d, and you\u2019d like to replace that prefix with something more meaningful, like \u201cVacation2011?. Using a for loop as it was introduced above, you can do this in a flash (pun intended):<\/p>\n<p><code>for file in DSC*; do mv \u201c$file\u201d Vacation2011?${file#DSC}\u201d; done<\/code><\/p>\n<p>How does this work? The for loop runs for every file in the current directory of which the name begins with \u201cDSC\u201d. For every such file, mv is executed to move the file to \u201cVacation2011<name of the file with DSC stripped from the front>\u201d. The magic that strips \u201cDSC\u201d happens in \u201c${file#DSC}\u201d, where the \u201c#\u201d indicates that the string after it should be removed from the front of the contents of the variable before it. There also exist operations to strip from the back of the string (useful for removing file extensions), to search and replace in a string and to extract substrings. To learn more about string manipulation, visit Manipulating<br \/>\nStrings on TLDP.<\/p>\n<p><strong>9.) Dynamic port forwarding.<\/strong><br \/>\nSometimes you need to access a website that\u2019s only accessible from computers inside a certain network. Or, the other way around, sometimes you are in a certain network and you need unobstructed access to the internet, but some hyperactive firewall is in the way. If you have ssh access to a computer that does have the internet access you need, you can use it as an anonymous tunneling proxy without any additional tools. Just add the following option when you ssh into the server:<\/p>\n<p><code>ssh -D <port number> user@remotehost<\/port><\/code><\/p>\n<p>The -D option tells ssh to set up a dynamic port forward on local port <port number>. I like to use port number 1337, but almost any port between 1024 and 65535 will do. When you\u2019ve logged in on the remote server, you can configure your browser to use localhost with the port number you specified earlier as a SOCKS proxy (SOCKS versions 4 and 5 are both supported). This setting is usually found in the same place as the other options for using a web<br \/>\nproxy. In Firefox, look under Preferences => Advanced => Network => Configure how Firefox connects to the Internet. Once you\u2019re browsing over this SOCKS proxy, it will appear to the web as if the host you sshed into is browsing.<\/p>\n<p><strong>10.) Process substitution.<\/strong><br \/>\nEver wanted to diff the outputs of two commands quickly? Of course, you could redirect the output to a temporary file for both of them, and diff those files, like this:<br \/>\n<code><br \/>\nfind \/etc | sort > local_etc_files<br \/>\nfind \/mnt\/remote\/etc | sort > remote_etc_files<br \/>\ndiff local_etc_files remote_etc_files<br \/>\nrm local_etc_files remote_etc_files<br \/>\n<\/code><\/p>\n<p>This would tell you the differences between which files are in \/etc on the local computer and a remote one. It takes four lines, however. Using process substitution, we can do this is just a single line:<\/p>\n<p><code>diff < (find \/etc | sort) <(find \/mnt\/remote\/etc | sort)<\/code><\/p>\n<p>What\u2019s that < (\u2026) syntax? It means \u201crun the command inside it, connect the output to a temporary pipe file and give that as an argument\u201d. To understand this more thoroughly, try running this:\n\n<code>echo < (echo test)<\/code><\/p>\n<p>Instead of printing \u201ctest\u201d, this will print something like \u201c\/dev\/fd\/63?. You see now that the < (\u2026) part is actually replaced by a file. This file is a stream from which the output of the command inside <(\u2026) can be read, like this:\n\n<code>cat < (echo test)<\/code><\/p>\n<p>Now this does print \u201ctest\u201d! Bash redirects the output of \u201cecho test\u201d to \/dev\/fd\/<something>, gives the path of that file to cat, and cat reads the output of echo from that file. The shortened diff command above does the same, only for two slightly more complicated commands. This technique can be applied in any place where a temporary file is needed, but it does have a limitation. The temporary file can only be read once before it disappears. There\u2019s no use in saving the name of the temporary file. If you need multiple accesses to the output of a program, use an old-fashioned temporary file or see if you can use pipes instead.<\/p>\n<p>From <a href=\"http:\/\/tuts.pinehead.tv\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/tuts.pinehead.tv\/<\/a><\/something><\/code><\/port><\/name><\/p>\n","protected":false},"excerpt":{"rendered":"<p>From http:\/\/tuts.pinehead.tv\/ We all learn new things over time as we use applications with a vast amount of possibilities. Of course, some of those things would have been so useful if we had known them earlier. Here are 10 command line tricks that I wish I had learned much sooner. Note: these tricks apply to&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-4761","post","type-post","status-publish","format-standard","hentry","category-cli"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ten things I wish I knew earlier about the Linux command line - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ten things I wish I knew earlier about the Linux command line - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"From http:\/\/tuts.pinehead.tv\/ We all learn new things over time as we use applications with a vast amount of possibilities. Of course, some of those things would have been so useful if we had known them earlier. Here are 10 command line tricks that I wish I had learned much sooner. Note: these tricks apply to... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-23T18:23:14+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Ten things I wish I knew earlier about the Linux command line\",\"datePublished\":\"2012-09-23T18:23:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/\"},\"wordCount\":2306,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"CLI\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/\",\"name\":\"Ten things I wish I knew earlier about the Linux command line - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2012-09-23T18:23:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ten things I wish I knew earlier about the Linux command line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ten things I wish I knew earlier about the Linux command line - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/","og_locale":"en_US","og_type":"article","og_title":"Ten things I wish I knew earlier about the Linux command line - Linux Shtuff","og_description":"From http:\/\/tuts.pinehead.tv\/ We all learn new things over time as we use applications with a vast amount of possibilities. Of course, some of those things would have been so useful if we had known them earlier. Here are 10 command line tricks that I wish I had learned much sooner. Note: these tricks apply to... Read More","og_url":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2012-09-23T18:23:14+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Ten things I wish I knew earlier about the Linux command line","datePublished":"2012-09-23T18:23:14+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/"},"wordCount":2306,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["CLI"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/","url":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/","name":"Ten things I wish I knew earlier about the Linux command line - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2012-09-23T18:23:14+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/ten-things-i-wish-i-knew-earlier-about-the-linux-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Ten things I wish I knew earlier about the Linux command line"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/4761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=4761"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/4761\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=4761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=4761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=4761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}