Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Operating System Articles - Page 134 of 179
3K+ Views
Linux find statement is one of the most widely used statements that allows us to walk a file hierarchy. It is used to mostly find a specific file or directories and we can also append different other Linux statements or flags along with it to enhance or do a complex operation.Let’s explore an example of a find statement to understand it better.In the Linux code shown below, I am trying to search for a file inside my Downloads folder, and for that I am making use of the find statementfind sample.shOutputsample.shNotice that if the find command is able to locate ... Read More
3K+ Views
Unzip is the Linux command utility that we will use to unzip all zipped files present in a Linux directory.By default, the unzip utility is not present on most of the Linux distributions and we can install the same with the help of the commands mentioned below.For Ubuntu and Debiansudo apt install unzipFor CentOS and Fedorasudo yum install unzipSyntaxunzip file.zipIn the above syntax we just need to replace the file.zip with the file that we want to unzip.Consider a case where I have a directory named direct1 that looks something like this −immukul@192 direct1 % ls -ltr total 5216 -rwxrwxrwx ... Read More
1K+ Views
In order to test a crontab job we first need to explore and understand what a crontab job is.A crontab job is nothing but a list of commands that we can run during a cron job. A cron job is a utility that schedules automatic execution of commands at specific times.We can start a cron job with the help of bash script by following the commands shown below −crontab -eThis will open a file which you can edit, insert the cron job shell script in the above file and then close that file.Just insert the code shown below in the ... Read More
895 Views
The grep command in Linux is used to filter searches in a file for a particular pattern of characters. It is one of the most used Linux utility commands to display the lines that contain the pattern that we are trying to search.Normally, the pattern that we are trying to search in the file is referred to as the regular expression.Syntaxgrep [options] pattern [files]While there are plenty of different options available to us, some of the most used are −-c : It lists only a count of the lines that match a pattern -h : displays the matched lines only. ... Read More
3K+ Views
An Environment variable is a dynamic-named value. Generally, these are variables are exported in a single terminal using a command shown belowexport $SOMEVARIABLE=valueor they are stored inside the bash files, so that they remain available in all the terminals once the file is sourced. If we want to change an environment variable we can simply change the above command’s value field and then source the file, but if we want to do that with the help of the sed command then we need to know a little bit about the sed command.Let’s explore the sed command, which is short for ... Read More
1K+ Views
In order to be able to sort the contents of a file in Linux, we must first be aware of the sort command that Linux provides us with.The sort command is mainly used to sort the contents of a file. It arranges the records in a particular manner. By default, these records are sorted considering the fact that they are ASCII based values.Few key points to remember about the sort command are −SORT command does the sorting from one line to another, one line at a time.It prints the contents of the file when used on a file, in the ... Read More
740 Views
In order to simulate the packages that got delayed or dropped we can make use of the netem which provides us with a network emulation functionality that is helpful in testing protocols.The way netem works is that it tests the protocols by emulating the properties of wide area networks.There are different versions of netem and the current stable version allows us to emulate variable delay, loss, re-ordering and duplication of packets.There are two ways in which we can use the network emulator, the first is the most basic one where we can enable the netem kernel component by following the ... Read More
2K+ Views
We know that a shared library is a library that can be linked to any program at runtime. In order to view all the shared libraries used by an executable we make use of the Linux command utility known as ldd. We can easily locate the shared libraries on a Linux machine, as they usually start with lib* prefix.Let’s first understand and see examples of how to make use of the ldd command that Linux provides us with.Ldd is a command utility that Linux provides us with and is mostly used in case we want to know the shared library ... Read More
9K+ Views
Before setting up GOPATH or GOROOT on the local environment of yours, we must check whether you have correctly installed Go or not.Just type the following command on any user of the machine, where you think you have installed Go −go versionIf it outputs nothing or something like go is not present, then instead of setting the GOPATH first I would recommend that you first download the go binary from this link and then install it on your local machine.Normally the output for the case that you have Go installed will look something like this −immukul@192 linux-questions-code % go version ... Read More
6K+ Views
There are plenty of ways in which we can set an environment variable in Linux and then make use of it later. Some ways provide us access to that variable in a particular window, in other cases, we can get access to those variables in every terminal window and in a permanent manner.Let’s explore setting a new environment variable on an Ubuntu machine and then we can talk about setting the LD_LIBRARY_PATH.In order to set a new environment variable, follow the commands shown below in sequence.Command 1Open your bash-profile with the command shown below −vi ~/.bashrcCommand 2Make use of the ... Read More