Console

Use Tail command to view growing/changing files in real time

Many a times you will feel the need to view a constanly updating file. This is a common case with logs. People usually think that tail command is only used to view the last parts of a file, but it even provides you with the ability to view growing/changing files.

Please note that, by growing I mean files to whom data is being appended constantly. Using the “-f” option, tail lets us view the data that is being added to the file in real time.

Script - A command line tool to record/save your terminal activity

You may know about a lot of cool softwares but they become cooler when you find a use for them. Recently, someone told me about this brilliant command line tool - "script". It saves a session of your terminal. No! Its not like history. In spite of saving each command per line in a text file, script makes a typescript of everything that happens on the terminal. Screencasting tools to a desktop session(GUI) is what script is to a terminal.

Differences between su and su -

When you use Debian/Ubuntu for a long time, you tend to forget about su and gradually you both grow apart. I witnessed the same thing yesterday. I was working in a lab and my friend asked me, “Why’d you use su -. Why not a simple su!”. I replied, "Duh!" and then sat silently the rest of the time wondering why I couldn't remember a thing about the command which has been hard-coded in my brain all this time while my friend enjoyed the blackout.

Axel - A console based Download Accelerator for Linux

I am a big fan of wget. It provides you with immense capabilities, but when it comes to accelerating the download speed, wget doesn't provide any option. After searching for a decent download accelerator for Linux, I came across axel and it being a console tool is an added bonus.

How to - See the value of all your shell's environment variables using env command

As a linuxer, if you have the slightest experience of working on command line then you would have used environment variables. What’s it really? In short, they act as configuration parameters for applications or programs that we run. Depending upon where we define an environment variable, we can make it available for every application and user (global), only for a single user(local) or just for the shell we are working on(even smaller locality).

Difference between a root and non-root shell prompt

Have you ever looked at the command prompt carefully? Exactly! we usually don't care about the prompt. All we see is the little symbol at the end designating the prompt(usually its “$”) or at most look at the current working directory. This way sometimes we might not realize its actually a root prompt. This happens a lot when you are working at multiple terminals.

How Ubuntu's command suggestion feature works?

Have you ever wondered how Ubuntu gives you suggestions when you enter a wrong command name on a terminal? This feature is a great way to quickly figure out the error and even helps to find out the package that provide a particular tool. This task is taken care of by the command_not_found_handle() function in /etc/bash.bashrc.

How to Manage or edit pre-login console messages using /etc/issue file

If you have ever visited the console mode of your Linux(press Ctrl+Alt+F1) you would have noted some message above the login prompt. These messages are mentioned in the /etc/issue or /etc/issue.net file. The file doesn't only work for plain text but various escape characters and terminal escape sequences can be included too.

How to change the terminal colours from command line or console

So, I have been working on this console based project that prints a lot of messages. I wanted to make certain messages - warning etc. to be highlighted so that it could catch the user's eye easily. Since, the code was in C, I looked for printing colour using printf and came to know about this old school way of changing a terminal colours through commands.

How to view/list the files in an archive(tar or zip) without extracting/decompressing it

Many a times, its better to view what's in the archive before extracting it. Sometimes the stuff compressed together is useless and extracting it might be just a waste of time and energy. Here we will consider both tar and zipped files and will list out the files bundled inside without fully extracting it.

Syndicate content