1597606860
In this article, we will show you how to determine your current working directory using the pwd
command.
The current working directory is the directory in which the user is currently working in. Each time you interact with your command prompt, you are working within a directory.
By default, when you log into your Linux system, your current working directory is set to your home directory. To change the working directory use the [cd](https://linuxize.com/post/linux-cd-command/)
command.
For example, to change the current working directory to /tmp
you would type:
cd /tmp
If you have a customized bash
or zsh
prompt, the path to the current working directory may be shown in the shell prompt.
user@host:/tmp#
The pwd
command stands for print working directory. It is one of the most basic and frequently used commands in Linux. When invoked the command prints the complete path of the current working directory.
pwd
is a shell builtin in most modern shells such as bash and zsh. Its behavior is slightly different than the standalone /bin/pwd
executable. You can use the [type](https://linuxize.com/post/linux-type-command/)
command to display all locations containing pwd
:
type -a pwd
pwd is a shell builtin
pwd is /bin/pwd
As you can see from the output below, the shell builtin has priority over the standalone executable and it is used whenever you type pwd
. If you want to use the standalone pwd binary type the full path to the file /bin/pwd
#linux
1620616862
In this remove or delete directories and files linux tutorial guide, you will learn how to remove empty directory and non empty directory linux using command line. And as well as how to remove/file files linux using command line.
So, this tutorial guide will show you you how to use the rm
, unlink
, and rmdir
commands to remove or delete files and directories in Linux with and without confirmation.
https://www.tutsmake.com/how-to-remove-directories-and-files-using-linux-command-line/
#how to delete directory in linux #how to remove non empty directory in linux #remove all files in a directory linux #linux delete all files in current directory #linux delete all files in a directory recursively #delete all files in a directory linux
1625631509
Dig Command Line Options and Examples
Here is the frequently used command line options and example’s of dig command.
1. Basic Dig Command
A basic dig command accept domain name as command line parameter and prints Address record.
2. Query With Specific DNS Server
The default dig command queries to dns server configured on your system. For example, the Linux systems keep default DNS entry in /etc/resolv.conf.
3. Print Short Answer
Use +short command line option to print result in short form. This is basically useful with the shell scripting and other automation tasks.
4. Print Detailed but Specific Result
Use +noall with +answer to print detailed information but specific. This will print only answer section including few more details as a result.
#linux commands #command #dig #dig command #useful examples #linux
1625481038
How to Make a New Directory In Linux
To create a directory using the **_mkdir _**command in linux with terminal.
Note : To create a hidden directory, follow our guide on how to show and create hidden files in Linux.
How to Create Multiple Directories with mkdir
If you want to create multiple directory at once command. So, you can use a single mkdir command to create multiple directories at once.
Note that, Do not add any spaces in the curly brackets for the directory names.
How to Make Parent Directories
Note that, you can use ls -R to display the recursive directory tree in linux. And Without the -p option, the terminal returns an error if one of the directories in the string does not exist.
#linux #directories #command #mkdir command
1625625674
mv Command Examples
Below is the basic mv command examples on Linux terminal.
#linux commands #command #mv #useful example #mv command #linux
1625562321
date Command Examples
Show date time in UTC/GMT
View past dates on specific days
View future dates
View date in other timezone
Print date in specific format
View file modification time
#linux commands #command #date #linux