Basic Commands

I have successfully tackled the “Basic Commands” chapter in Rute User’s Tutorial. This chapter had a TON of useful information on the command line. There’s sections on the different error codes, file types, wildcards, man pages and commands. The really common commands get explained more in-depth. It’s pretty much everything a person needs to know to get started using the terminal.

The first thing that seemed really important for me was the explanation of glob expressions. I already knew about the wildcards: * matching any number of characters, ? matching one letter. These are great for finding files, ls *.pdf will list just my PDF files. Globs work the same way, but let me restrict the parameters to specific characters. Thus, ls [a-f]*.pdf will only list PDFs that begin with “a” through “f”.

Globbing would be especially helpful if I followed the author’s advice in file naming. The book suggests that I make up my own extensions to use on my files. The example the book gives is to name all letters person’s_name.letter. By doing this, I can search for all of my letters by searching for *.letter. I could search for all of my letters to my various aunts by searching for aunt*.letter. This seems like a genius file naming system. It seems like it would be especially useful for pictures. Setting up image file names with the pattern activity/pose/description.subject would allow me to search for selfie.* or *.val. It would also be great for music files: song_name.artist.

The second part of the chapter I found really useful was the list of commands. It’s a rather long list for a beginner, but each command has a description. The most useful of the new-to-me commands is clear, which just clears off my terminal screen. I also really enjoyed following the author’s suggestion for the calendar command: cal 9 1752. This month is crazy looking, the book says “the pope had a few days scrapped to compensate for round-off error.” I also tried the commands head and tail, but the results were not what I was expecting. I assume since the file I tried it on was a PDF, the information displayed was for formatting the document.

A lot of the commands listed are for manipulating the contents of a file. These commands don’t seem to always work on the documents I usually use, PDFs, spreadsheets, etc. So I might have to make up some .txt documents so I can play with these commands.

The author also recommends installing Midnight Commander, a file manager that will let me move around files more quickly. I haven’t installed it yet, but it’s definitely something I’m going to look into.

Advertisements
This entry was posted in Coding, Experiences and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s