This is not really a direct example of the history command but it deals with the history of commands and I wanted to discuss it. You can use the!!to get the last run command. This is extremely useful in the case
Now, each time you use thedccommand, the location in theCDPATHenvironmentvariableis checked first for matching directory names. If any of them match the target you provided in thecdcommand, you're transferred to that directory. Now, regardless of where you are in the filesystem, when you us...
Thechmodcommand reads the above command as follows: #chmod 007 testfile Examples This tutorial is part of the tutorial "Linux file permission Explained with Examples.". Other parts of this tutorial are as follows: Chapter 1Linux File Permission Explained in Easy Language Chapter 2How to...
The cd command allows you to browse files and directories within your Linux system. The following syntax must be run with sudo privileges:cd /directory/folder/pathHere’s how it looks:root@srv:/# cd /directory/folder/pathroot@srv:/directory/folder/path#You need the directory name or complete...
In this tutorial, we are going to explain the “du” command used on everyLinuxdistribution such as Ubuntu, Debian, or CentOS. “Du” stands for Disk Usage and every Linux user should use it very often to check the amount of disk space used by directory or file. Using the “du” comm...
Linux provides the pipe command, represented by the | symbol, to redirect the standard output from one command to a second command. This allows you to “chain” commands together and assemble a command pipeline. For example, you can send the results of the cat command to the grep commands ...
Chapter 01How to Use the help Command in Linux Chapter 02How to Use the man command in Linux Chapter 03How to use the info and pinfo commands in Linux Conclusion Linux shell provides two types of commands: internal and external. Internal commands are part of the shell. External commands ar...
Thedisowncommand is a part of the Unix ksh, bash, and zsh shells and is used to remove jobs from the current shell. Likecdorpwd, it is a shell built-in command, and doesn’t require root privileges. This tutorial will cover different ways you can use thedisowncommand in Linux to both...
The chown command in Linux enables you to change the user and group ownership of a file or directory. Learn to use chown with some practical examples.
In this tutorial, we will show you how to use the pwd command on a Linux distribution. The pwd command is short forprintworkingdirectory and is used to output the full path of the current working directory. You can change the directory by using thecd commandor list the contents of the ...