diff --git a/bash-scripting/moving-everything-one-level-up.md b/bash-scripting/moving-everything-one-level-up.md new file mode 100644 index 0000000..7617717 --- /dev/null +++ b/bash-scripting/moving-everything-one-level-up.md @@ -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 +``` +