Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

A lot of times when I'm unzipping files, I'll get a messed up directory structure that looks like /home/bob/myfolder/myfolder/otherstuff. Where the only thing that the first myfolder contains is another directory named myfolder.

How could I collapse this path to get /home/bob/myfolder/otherstuff? I.e. I want to remove the useless in-between link.

share|improve this question
    
Not really a question. I am assuming you know how to use cd , mkdir, cp, mv etc.... –  drN Oct 28 '12 at 23:05

1 Answer 1

Using your example, open a terminal and do:

cd /home/bob
mv myfolder myfolder1
mv myfolder1/myfolder .
rm myfolder1

Or just cut/paste in a file browser.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.