In Linux (Ubuntu), how do you move all the files and directories to the parent directory?
|
feedback
|
find . -maxdepth 1 -exec mv {} .. \;
this will move hidden files as well. You will get the message: mv: cannot move `.' to `../.': Device or resource busy when it tries to move | |||||||||||||
feedback
|
|
Type this in the shell:
| |||||||
feedback
|
|
Assuming all your hidden files begin with dot followed by a letter or a number (which they should), you could use
The | |||
|
feedback
|
|
In bash you can use shopt -s dotglob to make * match all files and move them simply by
This is not the best solution since the setting is permanent for the shell until you change it by
but I think it's good to know. | |||
|
feedback
|
|
It's simple to move all files and folders to the parent directory in Linux. Go to that folder and use this command:
For example, if your files and folders are as follows:
Go to that folder via cd:
All your files and folders will move to the abcuser folder (parent directory). | |||||
feedback
|
