+4 votes
191 views
How to move or copy files or folders in Linux?

in Linux / Unix by (551k points)
recategorized by | 191 views

1 Answer

+5 votes
Best answer

How to move files or folders in Linux?

Many of us if not that most of us are used to using a graphical interface or desktop environment so to speak. The tasks of moving, editing, rename, among other things, files or folders are usually done in a simple way with just a couple of clicks.

But what happens when you must use these movements in a server that most of them are usually managed only from a command console, this is usually occupied in dedicated servers, but it never hurts to know how this is done because you never know When can it be occupied?

It has happened to me that in some occasions I have lost my graphic environment and I have to use the console to recover it, but that is another point.

The day I come to share with you a few simple commands that help us to perform the tasks of copying or moving files.

How to move files or folders in Linux?

The first thing will be to have a terminal which will be our tool that will help us all this, the second thing is to create some folders with text documents inside this so that you do not get to damage or lose information.

The most usual thing is to move some directory file, so we will occupy the mv command:

mv archivo.txt /home/usuario/Documentos/prueba

Here what we are doing is moving file.txt to the test folder that is in our document folder. For this we take into account that we are currently positioned in the directory where file.txt is located

When we want to move more than one file at a time, the syntax type would be the following:

mv archivo.1 archivo.2 archivo.3 /ruta/de/destino

Now something very useful is to use an * when the files have the same base in the name, for example:

Amd-gpu …

Amd-gpu-pro ...

Amd-driver ...

The most usual thing is to move some directory file, so we will occupy the mv command:

mv archivo.txt /home/usuario/Documentos/prueba

Here what we are doing is moving file.txt to the test folder that is in our document folder. For this we consider that we are currently positioned in the directory where file.txt is located

When we want to move more than one file at a time, the syntax type would be the following:

mv archivo.1 archivo.2 archivo.3 /ruta/de/destino

Now something very useful is to use an * when the files have the same base in the name, for example:

Amd-gpu…

Amd-gpu-pro ...

Amd-driver ...


by (3.5m points)
selected by

Related questions

+5 votes
1 answer
+4 votes
1 answer
asked Aug 20, 2019 in Mac by backtothefuture (551k points) | 221 views
+3 votes
1 answer
asked Oct 30, 2019 in Mac by backtothefuture (551k points) | 231 views
+5 votes
1 answer
+4 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback
10,634 questions
10,766 answers
510 comments
3 users