Found 2065 Articles for Operating System

How should strace be used on Linux?

Mukul Latiyan
Updated on 29-Jul-2021 11:35:44

90 Views

Linux utility commands are what makes Linux such a powerful operating system, while there are plenty of commands that we can use to interact and get information about the signals and system calls, but the most used and preferred command when it comes to getting the information about the system calls and signals is the linux trace command.It can be used for getting a diagnosis of the system, for monitoring specific processes or instruction tools of Linux. It has variety of use cases and some of these use cases are −Print timestamp for each system callOutput line with clock timeTrace ... Read More

How is the Linux kernel tested?

Mukul Latiyan
Updated on 29-Jul-2021 11:34:21

198 Views

When we talk about something as big as the Linux operating system, one thing that also comes into my mind is how they make it work so effectively. Sure, it works like a charm, but how do they handle all the bugs and errors that can literally exist anywhere in the source code of the entire systemWe know that we get a new Linux operating system every three months and in that period roughly two weeks are reserved for the “merge window”. This window is the time where all the code that has already been developed and approved will be ... Read More

How to send a file as an email attachment using the Linux command line?

Mukul Latiyan
Updated on 29-Jul-2021 11:32:50

3K+ Views

In order to send a file as an attachment to an email using Linux, we either need to make use of a command line email client or the standard linux mail command.There are multiple command line email clients available to achieve the attachment task, but the most common and widely used is mutt.Mutt is a command line based email client that allows us to send and read emails from command line in Linux based systems. It also supports important protocols like IMAP and POP which broadens the use-cases and application of mutt.Some of the key features that Mutt has are ... Read More

How to list one filename per output line in Linux?

Mukul Latiyan
Updated on 29-Jul-2021 11:31:08

3K+ Views

There are plenty of Linux utility commands present to print the list of all the files and folders that are present in the current directory. Most commonly used are the ls and the find command.Let’s explore a simple example where we will make use of the ls command to list all the files and the folders present in a particular directory.CommandlsOutputapi cluster docs LICENSE Makefile.generated_files pkg staging vendor build cmd go.mod LICENSES _output pluginOn Ubuntu, we get the output in the above format, ... Read More

How to increase the scrollback buffer in a running screen session on Linux?

Mukul Latiyan
Updated on 29-Jul-2021 11:29:23

580 Views

Screen or sometimes also known as GNU Screen, is a terminal multiplexer. What it means is that it allows you the privilege to start a screen session and then open any number of windows inside that session.It might also be interesting to note that a process that is running in Screen will continue to run even when their window is not visible anymore.Installing Linux ScreenIn order to install the screen package if it is not already present on your linux distribution, you can run any of the suitable commands shown below for your machine.For Ubuntu and Debiansudo apt update sudo ... Read More

How to find all the distinct file extensions in a folder hierarchy (Linux)?

Mukul Latiyan
Updated on 29-Jul-2021 11:28:26

903 Views

While there are plenty of ways to find the extension of a particular file in Linux using different utility commands, if we need to find all the distinct file extensions in a folder hierarchy we need to first understand the uses of the find and the sed command as these commands will be used to print all the distinct file extensions in a folder or a folder hierarchy.The two Linux utility commands that we must be aware of are −find − used to locate a particular file or directorysed − short for stream editor and is used to perform functions ... Read More

Getting root permissions on a file inside of vi on Linux

Mukul Latiyan
Updated on 29-Jul-2021 11:27:00

498 Views

There are many scenarios where we think that we have opened a file to make changes to it using the root user but when we actually try saving the changes, we realize that the file was opened with a normal user or with a user that doesn’t have the specific permission to edit the file. In such cases, we usually have only one option and that is to close the file with the command shown belowq!And then, open the file again with the command shown belowsudo su vi file.txtMake changes and save the file with the command shown belowwq!While this ... Read More

Generating a SHA-256 hash from the Linux command line

Mukul Latiyan
Updated on 29-Jul-2021 11:25:13

4K+ Views

There are plenty of ways to generate a hash on any operating system, but when we talk about generating an almost-unique and fixed size bit hash, then nothing can replace the SHA algorithm.Before making use of the Linux command to generate a SHA-256 hash, we must know what SHA actually is and what it is good for.SHA-256 in very simple terms is a cryptographic hash function that has a digest length of 256 bits. It is an algorithm on its own that is able to generate an almostunique and fixed size 256-bit(32-byte) hash. It is also good to know that ... Read More

How to find the files in Linux that have been changed in the last 24 hours?

Mukul Latiyan
Updated on 29-Jul-2021 11:23:50

1K+ Views

One thing that is constant about working with Linux is that we will make changes to one file or another with time. There are some files that stay unchanged, for example the files inside the /usr/local/ directory while there are some files that are just temporary and get deleted automatically, like the files or folders you insert in the /tmp directory.Since we know that change is imminent to files and folders, Linux also provides us with different ways to keep track of the files or folders that we change or have changed.The most common way to check if we have ... Read More

Linux – How to find the files existing in one directory but not in the other directory?

Mukul Latiyan
Updated on 29-Jul-2021 11:20:02

464 Views

Let’s consider a case where we have two directories, say, d1 and d2 and both these directories contain some files, which may be the same or different. Now we want to list out the names of those files that are present in one of these directories say d1 and not present in the other directory say d2.In order to do that we must be familiar with either the diff command or the comm command, as both these commands can be used to solve the above problem.Let’s first explore the diff command, which is short for difference. This command is used ... Read More

Advertisements