Shilpa S

Shilpa S

47 Articles Published

Articles by Shilpa S

47 articles

How to change file or directory permission in Linux/Unix?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 2K+ Views

We know that Linux/Unix is a multiuser operating system where files and directories are associated with permissions so that only authorized users can access the files. The chmod command is used to change the access permission of files or directories. Syntax The general syntax of the chmod command is as follows − chmod [OPTION]... [Mode]... [File]... The chmod command contains three parameters that help set or change file permissions. Let's discuss each parameter in detail. Command Options A brief description of options available in the chmod command − ...

Read More

How to change the file owner and group in Linux?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 29K+ Views

To change the file owner and group, we use the chown command in the Linux operating system. Linux is a multiuser operating system where every file and directory belongs to an owner and group. The chown command allows administrators to transfer ownership and group membership of files and directories. Syntax The general syntax of the chown command is as follows − chown [OPTION]... [OWNER][:[GROUP]] FILE... chown [OPTION]... --reference=RFILE FILE... Common Options Option Description -c, --changes Gives a diagnosis for all files that actually changed ...

Read More

How to change the shell working directory in Linux?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 1K+ Views

To change the shell working directory, we use the cd command in the Linux system. The cd (change directory) command is one of the most fundamental navigation commands that allows users to move between different directories in the filesystem. cd (change directory) The cd command is used to change the current working directory in Linux/Unix operating systems. It is equivalent to the cd or chdir command in Windows. The command is also available in the EFI shell (Extensible Firmware Shell). By default, when you open a new terminal session, the current working directory is set to your home ...

Read More

How to check total space and available space in Linux using the terminal?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 880 Views

In Linux/Unix systems, the df (disk free) command is the primary tool for checking storage details and disk space usage. It displays total space, used space, and available space for mounted file systems through the terminal. df (disk free) command The df command reports file system disk space usage in the Linux system. By default, it shows space usage in 1K blocks, but various options make the output more readable and useful for different purposes. Syntax The general syntax of the df command is as follows: $ df [OPTION]... [FILE]... Common Options ...

Read More

How to compare two sorted files line by line in the Linux system?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 2K+ Views

To compare two sorted files line by line in Linux, we use the comm command. The comm command compares two sorted files and displays the differences and similarities in a structured three-column format. The comm command writes output to three tab-separated columns: the first column contains lines unique to the first file, the second column contains lines unique to the second file, and the third column contains lines common to both files. Both input files must be sorted for comm to work correctly. Syntax The general syntax of the comm command is − comm [OPTION]... ...

Read More

How to converts tabs to spaces in the Linux system?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 4K+ Views

While working with files, sometimes we encounter situations where a file contains many tabs and the requirement is to have spaces instead. For simple files, this conversion is easy, but for large files with numerous tabs, manual conversion becomes very difficult. This is where the expand command becomes essential. The expand command in Linux is used to convert tabs to spaces. If no file is specified, the expand command reads from standard input and processes the text accordingly. Syntax The general syntax of the expand command is as follows − expand [OPTION]... [FILE]... ...

Read More

How to copy a file, group of files, or directory in Linux?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 2K+ Views

The cp command is used to copy files or directories in Linux/Unix systems. It allows you to duplicate files from a source location to a destination directory. By default, cp works with files only − to copy directories, you must use the -R (recursive) option. Syntax The general syntax of the cp command is as follows − cp [OPTION]... [-T] SOURCE DESTINATION cp [OPTION]... SOURCE... DIRECTORY cp [OPTION]... -t DIRECTORY SOURCE... Common Options Option Description -R, -r, --recursive Copy directories recursively -i, --interactive Prompt ...

Read More

How to create a new directory in Linux using the terminal?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 3K+ Views

The mkdir command is used to create a new directory in the Linux/Unix operating system. It can create single or multiple directories at once and set permissions during creation, similar to the chmod command. Syntax The general syntax of the mkdir command is as follows − $ mkdir [OPTION]... [DIRECTORIES]... Command Options Option Description -m, --mode=MODE Set file permissions at the time of directory creation (like chmod) -p, --parents Create parent directories as needed; no error if directory exists -v, --verbose Display ...

Read More

How to create key binds in the Linux system using the terminal?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 2K+ Views

To set Readline key bindings and variables in the Linux system, we use the bind command. The bind command is used to assign functions and macros to keys, allowing you to create hotkeys instead of typing entire commands. It is a shell built-in command available in bash. Syntax The syntax of the bind command is as follows − bind [-lpsvPSVX] [-m KEYMAP] [-f FILENAME] [-q NAME] [-u NAME] [-r KEYSEQ] [-x KEYSEQ:shell-command] While the general syntax appears complex, the bind command is simple to use and allows you to easily create custom key bindings ...

Read More

How to list all users who are currently logged into the Linux system?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 4K+ Views

The who command is a fundamental Linux utility used to display information about users who are currently logged into the system. It shows details such as login names, terminal lines, login times, and remote hostnames. The who command is closely related to the w command, which displays additional information about user processes. Syntax The general syntax of the who command is − who [OPTION]... [ FILE | ARGUMENT1 ARGUMENT2 ] Common Options Option Description -a, --all Same as -b -d --login -p -r -t -T -u ...

Read More
Showing 1–10 of 47 articles
« Prev 1 2 3 4 5 Next »
Advertisements