Linux.com

Home Learn Linux Linux Answers Internet move all files from a directory to another one
Answers
  • type "man mv" into a terminal and read up.
    mv /somefolder/* /anotherfolder/*

    Answered by GoinEasy9
    3 years ago
    1 0
  • try the copy command 'cp'
    $ cp -r myfolder/* destinationfolder

    cp -r means copy recurrsive, so all folders and files will be copied.

    You can use the remove command 'rm' to remove a folder
    $ rm -r myfolder

    Answered by TS S
    3 years ago
    0 1
  • There's almost always more than way to do something in Linux. And more importantly, there are almost always caveats. There are more and less percise ways to do things. For example, using cp or cp -r will copy files from one place to another, but can / will still alter those files as far as the file system is concerned. A file is more than its contents after all. There is metadata for that file that is used by the files system, like creation time, access time, owner, permissions, etc. cp will not perserve this information.

    You can also look at the cpio and rsync commands, depending on what exactly your needs are.

    Answered by Adam
    3 years ago
    0 1
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Internet

Upcoming Training Courses

  1. LF320 Linux Kernel Internals and Debugging
    13 May » 17 May - Virtual
    Details
  2. LF425 Linux Performance Tuning Crash Course
    13 May » 13 May - New York
    Details
  3. LF331 Developing Linux Device Drivers
    03 Jun » 07 Jun - Virtual
    Details

View All Upcoming Courses

Community Answers - Search

30 Linux Kernel Developers in 30 Weeks

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board