Assisting 13866823 developers since 2005.

Web Developer, Open Source, Loyal, Dad.  

Read More »

Linux: How to Move All Content in One Directory to Another

Posted by David  •  Jul 7th, 2014 7:09:16 pm - Subscribe | Mood: happy |

This entry explains how to move all content from one directory to another directory with out copying the original directory itself.



Step 1: In this example I will begin by getting a file from the web. In the command prompt type:

wget http://example.com/file.tar.gz

Step 2: I will begin the extraction process, since the file is in a tar ball, we need to extract the contents. In the command prompt type:

tar -xf file.tar.gz

Step 3: Finally, we will move the extracted directories contents 'mydir' to the path that we wish the files to be moved to.

mv mydir/* /home/david/mynewdir

I know this is a 101 tip, but it never hurts to reflect on your command line beginnings. If you have questions leave a comment.

Comments 0  •  Jul 7th, 2014 7:09:16 pm - Subscribe  •  Tweet this entry | Post a comment



Responses

Leave a Reply


ReCaptcha:

Posting as anonymous Anonymous guest, why not register, or login now.

Image Gallery

Badges

Amazon Wishlist Stumble Upon Toolbar
Internet Blogs - Blog Top Sites Internet Blogs - Blog Top Sites Technology

About Me

avatar

@davidpolanco
iPhone: 29.513522,-98.565523 Web Designer, Open Source, Loyal, Dad. Learn more...