Search code examples
linux

Move Everything in a Directory Up One Level


Let's say I have this:

myfiles/stuff/things/whatever.txt

I want to move everything in the "things" directory to the "stuff" directory without listing each file one at a time. In my example, I have 1 file, but in real life, I have 1000 files.

Any suggestions?


Solution

  • I'm assuming there is no restriction for you to use the linux terminal here.

    If you are in the myfiles/stuff/things directory then do

    mv * ..
    

    or if you want to move in general

    mv myfiles/stuff/things/* myfiles/stuff/