How to Move Files and Directories in Linux


When you’re new to Linux distributions, you may well be at a loss for words about some positive duties. Although they’re somewhat at hand to accomplish, because of lack of expertise, it makes them complicated. One of those duties is transferring information and directories in Linux.

The easy method to switch information and folders (directories) is in the course of the “mv” command. This integrated command is a multi-tasking command that also is used to rename information as smartly.

Move Files and Directories in Linux Using mv Command

Let’s divide this text into two parts;

First portion will duvet find out how to transfer information and different will duvet find out how to transfer directories:

The syntax of mv command is:

mv [source_path] [destination_path]

Moving information can also be finished the use of two tactics:

Let’s test how we will do it:

1. How to Move File in Linux the use of Terminal

There is a checking out report in my machine named “sample.txt” within the machine, we can use this to accomplish mv instructions.

(If you wish to have to create a brand new report, use “touch” command; i-e, contact pattern.txt, it is going to create a brand new report in machine)

Now, run the next command to transport “sample.txt” within the Documents listing:

$ mv pattern.txt /house/wardah/Documents

To ascertain whether or not command works or no longer, kind:

$ ls /house/wardah/Documents

It may well be complicated for newcomers about giving proper supply and vacation spot trail, you’ll be able to test it thru following manner:

Right click on at the required report or folder and click on on “Properties” from pop-up menu:

You gets trail there:

2. How to Move File in Linux the use of GUI

The information folder is positioned on the left nook on display. If you don’t get it, move to the appliance supervisor and kind “files” or “nautilus” within the seek bar. You gets information possibility, make a selection it to unearths are information provide on machine:

Navigate in opposition to required folder you wish to have to transport, let’s think to transport “testing.txt” report, right-click on it and navigate in opposition to “cut” possibility:

Go again to the house listing and make a selection the folder the place you wish to have to transport the reduce report, correct click on there, and hit to Paste possibility:

Your report will transfer effectively:


Moving information and listing is probably the most helpful job whilst operating with the machine. In Linux, customers can transfer information and folders in the course of the integrated mv command which is simple to accomplish. This article has coated the tactics to switch information and folders within the Linux machine. We carried out it the use of two tactics; i-e thru terminal and GUI.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More