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 ...