Make or create hidden directory in Linux Fedora with mkdir command.
Step by step example to make/create hidden directory in Fedora using Linux mkdir command.
Make and using hidden directory with mkdir command on Linux Fedora Core operating system. The hidden directory or file in Linux system begin with '.' (dot) in front of their filename. The example below show step by step process of creating hidden directory in Linux Fedora Core system.
1. Create directory called 'folder' and change to that directory.
[root@fedoracore ~]# mkdir folder
[root@fedoracore folder]#
[root@fedoracore ~]# cd folder/
[root@fedoracore folder]#
2. Issue ls command to see what in the directory that newly created.
[root@fedoracore folder]# ls -a
. ..
[root@fedoracore folder]#
[root@fedoracore folder]# ls -al
total 12
drwxr-xr-x 2 root root 4096 Jun 19 05:53 .
drwxr-x--- 40 root root 4096 Jun 19 05:53 ..
[root@fedoracore folder]#
Note: From the ls command output above, we know that even empty directory have two hidden directory in it, the '.' and '..' directory. The singe dot '.' represent current directory, and double dot '..' represent upper current directory.
3. Now lets begin with creating the hidden directory. Our first hidden directory called 'hidden_directory'. But as we know that hidden directory must begin with '.' dot infront of their filename, so the 'hidden_dectory' become '.Hidden_directory'.
[root@fedoracore folder]# mkdir .hidden_directory
[root@fedoracore folder]#
3a. Verify the creation of hidden directory with ls command.
[root@fedoracore folder]# ls
[root@fedoracore folder]#
3b. Execute the ls command again but now with -a and -al to verify the creation of our first hidden directory.
[root@fedoracore folder]# ls -a
. .. .hidden_directory
[root@fedoracore folder]#
[root@fedoracore folder]# ls -al
total 16
drwxr-xr-x 3 root root 4096 Jun 19 05:55 .
drwxr-x--- 40 root root 4096 Jun 19 05:53 ..
drwxr-xr-x 2 root root 4096 Jun 19 05:55 .hidden_directory
[root@fedoracore folder]#
Create hidden directory with dot '.' and '..' as filename.
Now lets play around with the hidden directory. In this example, we create hidden directory or hide directory using the same or look like the dot (.) and double dot (..) directory.
EXAMPLE 01:
1. Issue mkdir command, as we know the '.' directory is represent the current directory that we are currently in. The mkdir command below actually making the hidden directory with '. ' as filename, notice that we actually instruct the mkdir to make new hidden directory called 'dotspace'.
[root@fedoracore folder]# mkdir '. '
[root@fedoracore folder]#
2. Now we use ls command to see what happen after the execution of the mkdir command above.
[root@fedoracore folder]# ls -a
. . .. .hidden_directory
[root@fedoracore folder]#
[root@fedoracore folder]# ls -al
total 20
drwxr-xr-x 4 root root 4096 Jun 19 05:56 .
drwxr-xr-x 2 root root 4096 Jun 19 05:56 .
drwxr-x--- 40 root root 4096 Jun 19 05:53 ..
drwxr-xr-x 2 root root 4096 Jun 19 05:55 .hidden_directory
[root@fedoracore folder]#
Note: Now from the naked eye, we can see that we have two '.' directory.
Using the hidden directory.
3. To change directory (cd) or go inside the '. ' directory make sure you put single quote, dot and space after the dot and end with the single quote again. The example below show the step to change to the hidden directory.
[root@fedoracore folder]# pwd
/root/folder
[root@fedoracore folder]# cd '. '
3a. Verify with the pwd (print current working directory) command.
[root@fedoracore . ]# pwd
/root/folder/.
[root@fedoracore . ]#
EXAMPLE 02:
1 Issue mkdir command to make hidden directory that use '.. ' as filename (dotdotspace).
[root@fedoracore folder]# mkdir '.. '
[root@fedoracore folder]#
1a. Use the ls command to verify that the hidden directory created.
[root@fedoracore folder]# ls -a
. . .. .. .hidden_directory
[root@fedoracore folder]#
[root@fedoracore folder]# ls -al
total 24
drwxr-xr-x 5 root root 4096 Jun 19 05:57 .
drwxr-xr-x 2 root root 4096 Jun 19 05:56 .
drwxr-x--- 40 root root 4096 Jun 19 05:53 ..
drwxr-xr-x 2 root root 4096 Jun 19 05:57 ..
drwxr-xr-x 2 root root 4096 Jun 19 05:55 .hidden_directory
[root@fedoracore folder]#
Using: the hidden directory.
2. Change current working directory to '.. ' (dotdotspace) directory.
[root@fedoracore folder]# pwd
/root/folder
[root@fedoracore folder]#
[root@fedoracore folder]# cd '.. '
[root@fedoracore folder]#
2a. Verify.
[root@fedoracore .. ]# pwd
/root/folder/..
[root@fedoracore .. ]#
[root@fedoracore .. ]# cd ..
[root@fedoracore folder]# pwd
/root/folder
[root@fedoracore folder]#
Related:
1. Linux 'mkdir' command example.
Keywords: hidden directory, create hidden directory, make hidden directory, using hidden directory, cd to hidden directory, hidden folder, create hidden folder, hide folder, hide directory.
- 32929 reads
- Email this page
Recent comments
8 years 40 weeks ago
8 years 44 weeks ago
9 years 4 weeks ago
9 years 11 weeks ago
9 years 21 weeks ago
9 years 24 weeks ago
9 years 31 weeks ago
9 years 38 weeks ago
9 years 42 weeks ago
9 years 47 weeks ago