28 June

How to change directory using cd command in Linux?

The cd command in Linux is used to change the current directory. cd is a shell builtin command. Syntax cd [path]  where path specifies the path of the new directory. For example: The current working directory as checked with pwd command was /home/baljit/search. Next, we  use cd to change the directory to /home/baljit/cse325 Different methods […]

26 June

How to search for files in Linux?

Sometimes you want to apply command on several files or a subset of files. For example, you want to delete all files whose name starts with “TH”. So there are two ways to do it. One, you delete them one by one or you specify some pattern which matches all files starting with “TH”. In […]

24 June

How to create files using touch command in Linux?

In this post we focus on How to use touch command in Linux? Use touch command is used to update the timestamp of a file or directory. Timestamp means that it will update the access and modification times of the file or directory specified. Syntax touch [OPTION]…[FILE]… Example of How to use touch command in […]

21 June

How to use ls command in Linux?

Use ls command in Linux is used to list the directory contents. If a directory name is not specified then the contents of the current working directory are displayed. Syntax ls [OPTION]… [FILE]… Example of How to use ls command in Linux? First, we use ls without specifying any directory name. So it displays the […]

16 June

Difference between Contiguous Memory Allocation, Paging and Segmentation

A common question that comes to our mind is – What is the difference between Contiguous Memory allocation, Paging and Segmentation? We will understand this concept with an individual example, explaining each of the three concepts. Contiguous Memory Allocation In contiguous memory allocation the entire address space of the process is together. For example, if […]

13 June

Unsolved Questions on Memory Management

Try out these unsolved questions on memory management to check your conceptual knowledge. Q1. If the value of relocation register is 1000 and limit register is 700. What is the physical addresses for the logical addresses 1. 7002. 100 Q2. Given three free memory partitions of 150 KB, 50 KB , and 300 KB(in order). […]

09 June

How to define variables in shell script?

In this post we will learn how to define variables in shell script. A variable is used to store any value. The value can be an integer, float, character or even a string. There is not need to write the data type as is the case with C or C++ languages. For example x=1 y=2.5 […]

07 June

How to get OS version in C?

In this post we are going to solve a common question that dazzles most programmers – How to get OS version in C? When building an application sometimes a requirement is to check the operating system version. Programmers find it difficult to achieve this in C language. The solution to the above question is using […]