Most of the people who use Linux on regular basis tend to use command line a lot. This is because once you get used to it, its very easy to do stuff from command line. Now, if a person spends most of his/her time on command line then he/she should start learning all the available short cuts, tips and tricks that Linux command line has to offer. This will not only save time but will also make command line experience interesting. In this article, I will list out a few tricks that I use on regular basis.
Linux command line tips and... [More]
Typically, when the operating system is deployed it uses a generic configuration in order to provide a fair performance for any kind of application. The term application, in this paper, is used to reference any software that is executed over the operating system. Therefore, databases, web servers, e-mail servers, in-house made softwares, etc, all of them are referred here by the generic term “application”.
The behavior of each application depends on how it was designed and developed, but also on how it is used. At the... [More]
A few days back, I was trying to find details of a specific type of files on my Ubuntu box in office. Here is what I was trying to do : find ./ -name "*.out" | xargs ls -lart As you can see that I was trying to list out the details of all the files having .out extension. So far so good as I got what I wanted. Then one of my colleague wanted to use the same command on his Linux machine so he asked me to copy and send it to him. Though copying from command line using mouse and keyboard is not that difficult but somehow after I... [More]
Does you job requires you to frequently search for patterns in files through Linux command line? Or, do you feel frustrated when you have to open files in UI editors to search for strings or patterns on Linux? Well, if yes then the Linux grep command is for you. This command can be used to search a pattern in one or more files directly from the command line.
In this article, we will understand the usage of Linux grep command through practical examples.
Before jumping on to the examples, lets first take a look on... [More]
The Linux command 'stat' is used for displaying status information of Linux files and file systems. In this article, we will discuss the usage of stat command with examples.
stat command syntax
The syntax of stat command is :
stat [OPTION]... FILE...
stat command examples
1. A basic example
In the simplest form, the stat command can be used by supplying a file name as an argument :
$ stat testdisk.log
Size: 1014 Blocks: 8 IO Block: 4096 regular file
Device: 805h/2053d Inode:... [More]
Fetching the file system usage is a primary task while performing
maintenance of any OS. Various OS provide their own
tools/utilities/commands to fetch the file system usage. In Linux too
there exists a utility (df) that provides information on file system
usage. In this article, we will discuss the 'df' command
line utility with practical examples.
Before jumping to examples, lets quickly go through the description of
this command through man page.
DESCRIPTION This manual page documents the GNU version of df.... [More]
In the part -I ( here ) of this series, we understood the basic concept behind accessing and parsing the command line arguments in Linux. Also, we discussed a simple calculator program that parses the command line arguments and produces the output. In conclusion, we saw a glimpse of the standard 'getopt()' function that is mostly used for the parsing of command line arguments. In this part we will discuss the 'getopt()' function to understand its importance and how is it used. First we will understand the theory behind this function and then we... [More]
Configuring and administrating Linux by using command line utilities is the most popular and preferred way. If you have ever used Linux for your personal or professional work, you would have definitely used the command line.For example, to check the contents of a directory, most users prefer using the 'ls' command rather using the GUI. Most of these command line utilities are written in 'C' language and accept flags and arguments for accepting inputs from user.
For example :
The output of 'ls' command (for a... [More]
C provides a suite of functions ,to provide robust and concrete dynamic memory allocation, namely malloc, realloc, calloc and free.
void * malloc ( size_t size );
size: The number of bytes you wish to allocate.
Malloc allocates a block of memory and returns a void pointer to the start of that memory location. If the function failed to allocate the requested block of memory, a null pointer is returned.
When you malloc a block, it actually allocates a bit more memory than you asked for. This extra... [More]
In order to better serve our community we would like your input in our first ever Real World Linux survey. It will just take a few minutes and your answers are completely anonymous. This will cover what information interests you and what mechanisms you would like to notify you of updates. If you have problems with the embedded form, you can go to this external link . We appreciate your participation.
As a side note, this survey uses the free and open LimeSurvey package running on a Linux server.
iframes are not available for... [More]
Ubuntu One - The cloud storage service provided by Canonical , has introduced a new feature related to photos on it's web dashboard. With this feature, users can browse and share the photos that are stored in their Ubuntu One account. In short, you get a web interface on your personal cloud storage (snapshot above) to browse and share your photos. The sharing can be done with popular social media platforms like Twitter and Facebook. Besides, there are certain other features like slide show of photos when you... [More]
In a big announcement made by Canonical this week, the company announced Ubuntu OS for smart-phones. This OS for smart phones comes with a very different UI which aims to provide almost everything that you want - in just one swipe. Unlike other popular smart phones, the UI of Ubuntu phones rely heavily on the edge screen swipes. A swipe on each side screen of Ubuntu powered mobile device provides you a with a new set of features. This makes navigation between applications very easy. Also Ubuntu powered smart phones will have the same... [More]
The htop utility in Linux allows you to interactively monitor the processes in real time. It's very similar to top but has some extra features that makes it an even better command line utility for process monitoring. Here is an excerpt from the man page of htop : Htop is a free (GPL) ncurses-based process viewer for Linux. It is similar to top, but allows you to scroll vertically and horizon‐ tally, so you can see all the processes running on the system, along with their full command lines. Tasks related to processes (killing, ... [More]
Linus Torvalds lost his cool recently in official mailing list. His raw anger came in as a reaction when Mauro Carvalho Chehab, one of the Linux kernel maintainer introduced a buggy patch into the kernel but blamed pulseaudio software for the functionality break. Here is what Mauro said : Are you saying that pulseaudio is entering on some weird loop if the > returned value is not -EINVAL? That seems a bug at pulseaudio. To this, Linus responded furiously in the same mailing list : Mauro, SHUT THE F@#$ UP! It's a bug alright - in the... [More]
Hi, I am Himanshu Arora, owner of Real world Linux
group. As the year 2012 dawns and year 2013 rises, I'd like to wish all
the group members a happy and prosperous new year. Let's all make at
least one resolution to see a better us as we step in 2013. The team behind Real World Linux group has lots to offer in 2013. So, stay connected and experience the best of Linux in 2013. " Begin another new chapter and remember that you have 365 days
to make every page of the chapter worth remembering when you finish the
year. " -... [More]