mirror of
https://github.com/sahinakkaya/til.git
synced 2025-07-04 03:14:57 +03:00
TIL: Moving everything one level up
This commit is contained in:
8
bash-scripting/moving-everything-one-level-up.md
Normal file
8
bash-scripting/moving-everything-one-level-up.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
You can move every file (except the hidden ones) up by one level in the hierarchy with something like this:
|
||||||
|
```
|
||||||
|
for d in */ ; do
|
||||||
|
mv $d* .
|
||||||
|
rmdir $d # optional
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
Reference in New Issue
Block a user