Mar 07, 2022

Linux directory managing

As a Linux user you must master Linux terminal. You should be able to handle files and directories through shell.It is fast and quick than using a GUI application for file handling. In this tutorial we are going to see how we can use a shell to manage folders. I have divided this tutorial in to some small topics . So you can learn them all quickly.

1) How to know current directory.

As the first step we need to know how we get the name of current working directory. Actually it is not the name. It's full path related to root directory. It's so simple. Just type. pwd. Yes you are correct. It's a acronym for print working directory. In no time you can see Linux shell prints out what you wanted. linux-file-pwd

2) Getting a list of files in current directory.

This is a simple but powerful command. We can use ls command for getting a list of files those are located inside of current directory.

3) Creating a new directory.

Now we are going to make a new fresh directory. Yes new directory will be located in our current working directory. For this purpose we use mkdir command. It is similar to MD command in windows. mkdir [new_folder_name] linux-mkdir

4) Deleting a directory

When deleting a directory there are two modes. First one is
rm -r [directory_name]
Second one is
rm -rf [directory name]
In first mode you will prompted for every file inside the folder. But in second method we have used a additional character called f .That means we have forced to remove all files. So no warnings and directory get deleted. linux-rmdir

7) Go to a different directory.

This command is same as windows. By using a CD command we can go to different directory.
cd /user
linux-cd

4) Copy or move a directory

For copy a directory to a different location we use cp command.
cp -r new /temp
To move a directory we use same syntax with the command mv.
mv -r /new /temp
linux-cp-dir

5) Renaming a directory

The command we use to rename a directory is same as moving directory.we can do it like this.
mv /usr/test /usr/test2
mv-rename-dir
Mar 09
What are the most important directories in Linux

Working with a Linux distribution is a completely different thing. If you are a windows user you....

Mar 12
Simple crackme tutorial for beginners

Today I selected a basic crackme to demonstrate crackme solving with GDB. Also, we can solve this....

Mar 12
Remote Command Execution

In this. article we are going to see another interesting topic in web application hacking. This is....

Replying to 's comment Cancel reply
ABOUT AUTHOR
Thilan Danushka Dissanayaka

Thilan Dissanayaka

Hi, I'm Thilan from Srilanka. An undergraduate Engineering student of University of Ruhuna. I love to explorer things about CS, Hacking, Reverse engineering etc.

CATEGORIES
SOCIAL
RANDOM ARTICLES