Tags

C provides a suite of functions ,to provide robust and concrete dynamic memory allocation, namely malloc, realloc, calloc and free. Malloc 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 memory is used to store information such... [More]

Introduction 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 end, the... [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 you. Please try... [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. " - Pearl... [More]

Chris Walden, here, Managing Editor for Linux and Open Source on developerWorks and creator of this "Real World Linux" community. I wanted to share something with all of you as we close out 2012. PC World, a publication that is not necessarily known for pushing Linux had a recent article: Five reasons 2012 was a great year for Linux . If you are feeling discouraged about spreading more Linux around your life, it may pick you up a little. If you already have plenty of Linux and want to help other people understand it might bring... [More]

With the release of GNU sed version 4.2.2, the maintainer Paolo Bonzini has resigned from his post. He has been the maintainer of GNU sed project for past eight years. Also, for past three years he was maintaining the GNU grep project. In this latest development, he has announced his resignation from both the projects following a controversy over the control of the name and code base of gnuTLS project. In his announcement, Paolo said : I am less pleased to announce that I am resigning from maintenance of GNU sed (after 8 years) as well as GNU... [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]

The Linux foundation came up with a video recently that celebrates the success and milestones achieved by Linux in the year 2012. The video shows how Linux powered devices like Android smart-phones and supercomputers are dominating the world today. Other than this, video highlights chromebooks being sold by google and Linux conferences that took place around the world in 2012. Watch the video for more.
Note : The credits for the video goes to the author. The Intention is to just share the information through this video.

The other day when I was searching for some file in my Linux system, I got a result with name 'TheLinuxCommandLine'. I was not sure what type of file was that as ' vim TheLinuxCommandLine ' produced the following output :
%PDF-1.6^M%âãÏÓ^M
3006 0 obj^M<>stream^M
...
...
... While I got a clue from the word 'PDF' in the output above that it could be a PDF file but then I thought that there should be utility that could gracefully tell the type of file supplied to it as input. I searched a bit and found a Linux command line utility... [More]

Canonical announced the release of Kubuntu and Edubuntu 13.04 (Raring Ringtail) Alpha 1 on December 6 2012. The company clarified that the there will be no alpha release for Ubuntu 13.04 and the first official release for Ubuntu 13.04 would be available only as a beta release which is scheduled towards the end of march 2013. This was decided in the Ubuntu developer summit for Raring Ringtail. While people can still get hold of the daily Ubuntu images , the current alpha release is only for Kubuntu and Edubuntu. Here is what Stéphane... [More]

While going through an article on Linux text processing commands, I came across Linux sort command. I found this command interesting enough to read more about it and try out some of it's examples. So here in this article, I'll share my understanding on Linux sort command through some examples.
Before jumping on to examples, here is an excerpt of information from the man page of sort command:
NAME
sort - sort lines of text files
SYNOPSIS
sort [OPTION]... [FILE]...
sort [OPTION]... --files0-from=F
... [More]

What really is Zsh? Zsh (Z Shell) is a Unix shell with a powerful shell scripting engine. Zsh is an improvement over the Bourne Shell and includes some of the features of bash, ksh and tcsh. Why would you really use Zsh? 1) Command Completion -- like a ninja! Not only for files and directories but also for commands like git, kill etc. 2) Shared History This is one of the features I craved for while using bash. I usually like to work in multiple terminals and I like my command history to be shared with all the... [More]

I was on Youtube searching for a tutorial on some open source software and I stumbled upon this Linux/Opensource commercial. I found this one minute video so cute that I decided to share it with you all through this blog. I hope everybody will simply love it. The video Note : The credits for the video goes to the author. The Intention is to just share the information through this video.

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.
SYNTAX Before jumping on to the examples, lets first take a look on how to use the... [More]

I was trying to simulate a buffer overflow attack using a simple C program on my Ubuntu machine. I have read a bit of theory on stack smashing etc using buffer overflows so wanted to give a try on my own. I wrote the following C code :
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void)
{
char key[10];
int jackpot_open = 0;
memset(key, 0, sizeof(key));
printf("\n Enter the key : \n");
gets(key);
if (!strcmp(key,"Linux"))
{
... [More]

The du command in Linux can be used to estimate the space usage by files and directories. This article describes the usage of du command through some examples. The syntax From the man page of du : SYNOPSIS
du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F
DESCRIPTION
Summarize disk usage of each FILE, recursively for directories. From the syntax, it is pretty clear that the du command does not have any mandatory argument. File name can be provided either as a direct argument or through a file. The output of... [More]

Have you ever got stuck in a situation where-in you opened and edited a file in vim editor but when you tried to save the changes then the following error was thrown by vim : E45: 'readonly' option is set (add ! to override) Well, I encountered this error quite frequently as I usually forget to do a 'sudo' while opening files that require root permissions for editing. Those who have experienced this issue might know how annoying it may get. I have recently found the solution to it so I thought to share it here. The problem Consider... [More]

In Linux, wc is a small command line utility that can be used to display details like number of words, newlines, bytes etc for a file. The wc command can display some extra information like length of the longest line in the file. In this article we will discuss the usage of this command through examples. Here is the basic syntax of wc command :
wc [OPTION]... [FILE]... As clear from the syntax, multiple files can be supplied as input to the Linux wc command.
Linux wc command examples The file input.txt will be used in the examples... [More]

Well, this seems to be a direct attack by Ubuntu on Windows version 8 which is scheduled to be released on 26th October 2012. This attack was launched on Ubuntu's home page announcing the release of Ubuntu 12.10 ( Quantal Quetzal) on 18th October 2012.
Seems like Canonical (company that supports Ubuntu development) is trying to attract the regular windows users this time. The timing for the attack is good because Microsoft is already under severe criticism regarding the radical UI changes that have been introduced in Windows 8. Experts who... [More]

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 tricks ... [More]

Abstract: The Btrfs (B-tree file system) is a copy on write (COW) File System under GPL
license. Btrfs provides various features few of them are online
defragmentation, online addition and removal of block devices, online
balancing, writable snapshots, sub-volumes, volume resize and few more. This
article explores the primary features and usage of Btrfs. Introduction: Btrfs is next generation file system for Linux. It
provides significant space and time improvements over other... [More]

There are many people out there who use Linux for their daily needs. Linux has almost replaced windows for these people and they tend to agree with the fact that Linux is addictive. Its the sheer power of customization, stability and robustness that has contributed to the success of Linux. For a person using computer for his/her daily stuff, a text editor is a very basic requirement. Same goes with the Linux users, a text editor is the bare minimum requirement for them and most of them tend to use GUI based text editors like gedit. When asked... [More]

I have recently replaced Linux Mint with Ubuntu 12.04 LTS. While installing this version of Ubuntu, I faced an issue related to the installer itself. More on that issue can be found here . Other than that the installation was smooth. Once I started using 12.04 version of Ubuntu, I observed a major change in Ubuntu GUI. I googled a bit and found that its the new UNITY GUI that now I am playing around with. To be honest, initially I struggled to open even a command line terminal as I didn't knew where to launch a terminal from GUI but now I am... [More]

Various Linux distributions these days have started rolling out fancy GUIs to attract end users. Though this is a good strategy but working on Linux without understanding and using command line utilities is still not possible. Some one who uses Linux should know at least some basic commands that are required every now and then to accomplish trivial tasks. So, In this article, we will discuss a few commonly used (but must know) Linux commands with an example for each.
1. Linux ps command This command is used to provide information on the... [More]

In one of the earlier articles at this blog ( here ), we learned the Linux user login management. The article explained how user login and password are managed in Linux. Continuing on the same lines. In this article, we will learn how users are managed in Linux. This article will try to cover basics of Linux user management through command line tools as well as through GUI. Note that since I work on Linux Mint so the GUI part would be applicable only to the Linux debain distributions. Command Line tools for Linux user / group management ... [More]