Found 2003 Articles for Operating System

How to Create a Shared Directory for All Users in Linux?

Pradeep Elance
Updated on 03-Nov-2023 03:46:34

38K+ Views

When multiple users need access to the same set of directories of files then we need to create shared folders to be used by the users. In Linux there is concept of users and groups which can be given certain level of permissions that will enable them to share the data. Below are the steps how to create the shared folders where users can and update the files individually.Step 1 − Create the folder to be sharedAssuming we are setting up the shared folder from scratch, lets create the folder. The -p will create the directory and would ignore any ... Read More

How to Count Word Occurrences in a Text File using Shell Script?

Pradeep Elance
Updated on 03-Jan-2020 06:29:40

11K+ Views

Linux shell scripting has many powerful tools to process the data in files. One such feature is to find patterns and count the number of occurrences of matched patterns. One such example is to count the number of occurrences of a specific word in a given file. This is achieved by combination of commands for pattern search and counting. Below are the approaches which can be used for this need.Input fileLets use the below file for demonstrating the examples.$ cat inspire.txt Mastering anything needs practice. It also needs patience. And it needs time and other resources.Using grep and wcThe grep ... Read More

How to Count Number of Files and Subdirectories inside a Given Linux Directory?

Pradeep Elance
Updated on 03-Jan-2020 06:27:19

3K+ Views

It often becomes essential to know not just the count of files in my current directory but also the count of files from all the subdirectories inside the current directory. This can be found out using theUsing lswe can use ls to list the files, then choose only the ones that start with ‘-‘ symbol. The R option along with the l option does a recursive search. The ‘-c’ option counts the number of lines which is the number of files.ls -lR . | egrep -c '^-'Running the above code gives us the following result −13Using find With Hidden FilesThe ... Read More

How to Copy File Permissions and Ownership to Another File in Linux?

Pradeep Elance
Updated on 27-Jul-2023 13:29:22

1K+ Views

Many times while taking back up of data from one location to another or configuring software, we need to maintain the same level of ownership and permission of the files. Creating those permissions and granting ownership to individual files can be error prone of done by typing commands for each of the files. So we use some arguments with the chown and chmod commands.OwnershipWe use the –-reference swiych in the chown function to specify the ownership cloning from the source file to the target file.Syntaxchown --reference=source_reference_file target_fileIn the below example we have a source file whose ownership gets cloned to ... Read More

Create Shortcuts to Long and Complicated Paths in Linux (Gogo)

Pradeep Elance
Updated on 03-Jan-2020 06:20:28

122 Views

Gogo is a tool to bookmark directories with long and complicated paths in the Unix shell. Because the long parts are difficult to remember and cumbersome to type in. In this article we'll see how to install go go and use it.Installing gitWe first need to have git installed in our system which will be needed for gogo installation. To install git in an Ubuntu system follow the below command.$ sudo apt install gitRunning the above code gives us the following result −[sudo] password for ubuntu: Reading package lists... Done Building dependency tree Reading state information... Done The following additional ... Read More

Difference between Paging and Segmentation

Mahesh Parahar
Updated on 13-Sep-2023 15:44:24

36K+ Views

PagingPaging is a memory management technique in which process address space is broken into blocks of the same size called pages (size is power of 2, between 512 bytes and 8192 bytes). The size of the process is measured in the number of pages. Similarly, main memory is divided into small fixed-sized blocks of (physical) memory called frames and the size of a frame is kept the same as that of a page to have optimum utilization of the main memory and to avoid external fragmentation.Similarly, main memory is divided into small fixed-sized blocks of (physical) memory called frames and ... Read More

Difference between Operating System and Kernel

Kiran Kumar Panigrahi
Updated on 07-Dec-2022 06:23:49

9K+ Views

Both operating system and Kernel are types of system software. The basic difference between the two is that an operating system is a system software that acts as the interface between the users and the machine, while a kernel is a part of the operating system that converts user commands into machine language. Read through this article to find out more about operating systems and kernels and how they are different from each other. What is an Operating System? Operating System manages a computer and acts as an interface between user and computer. Operating system is the first program that ... Read More

Difference between Cold Booting and Warm Booting

Kiran Kumar Panigrahi
Updated on 28-Jul-2022 10:14:57

11K+ Views

When a user presses the power button on their computer, it initiates the process known as "booting, " which loads and starts the operating system. Booting can also be thought of as a series of actions where the ROM of the computer is accessed in order to load the startup instructions. After that, the operating system is loaded from the disc that is now being used to boot the computer.A primary option for the boot disc is frequently the local hard drive. The process of booting the computer is finished when the operating system is loaded; at this point, the ... Read More

Difference between Linux and Unix

Mahesh Parahar
Updated on 31-Oct-2023 03:53:47

20K+ Views

LinuxLinux is an open source multi-tasking, multi-user operating system. It was initially developed by Linus Torvalds in 1991. Linux OS is widely used in desktops, mobiles, mainframes etc.UnixUnix is multi-tasking, multi-user operating system but is not free to use and is not open source. It was developed in 1969 by Ken Thompson team at AT&T Bell Labs. It is widely used on servers, workstations etc. Following are the important differences between Linux and Unix.Following are the important difference between Linux and Unix.Sr. No.KeyLinuxUnix1DevelopmentLinux is open source and is developed by Linux community of developers.Unix was developed by AT&T Bell labs ... Read More

md5sum Command in Linux with Examples

Arnab Chakraborty
Updated on 21-Oct-2019 13:16:14

546 Views

Here we will see the md5sum command in Linux system. The MD5 is one of the Message Digest algorithm, that generates hash values to create checksum for the messages. It helps to identify if the integrity is maintained or not. Here we will see some example of md5sum command in Linux system.If we use this command on a string, it will generate a hash value, if we create some minor change in the text, it will generate massive change in the checksum.Examplesh-4.4$ echo 'Hello World' Hello World sh-4.4$ echo 'Hello World' | md5sum e59ff97941044f85df5297e1c302d260 - sh-4.4$If we change the content ... Read More

Advertisements