Results 1 to 3 of 3
I would like to know how to move all the files from a single folder and its subfolders to a single, different location in as few steps as possible. For ...
- 01-10-2011 #1Just Joined!
- Join Date
- Sep 2010
- Location
- Ohio
- Posts
- 12
How to move files from folder/subfolders to a different directory?
I would like to know how to move all the files from a single folder and its subfolders to a single, different location in as few steps as possible. For example when I download files from one of my school's websites, the file I want is located in a deep sub-directory. So, I have to cd many times just to get to the file I want. Is there a way to recursively move all the files within a folder's subdirectories into a new location? Thanks in advance for the help!
- 01-10-2011 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Google: find exec examples
** Any files with the same name will get overwritten by the last version of the file.Code:find /Existing_folder -name "*" -exec cp "{}" /New_Location \;
- 01-10-2011 #3Just Joined!
- Join Date
- Sep 2010
- Location
- Ohio
- Posts
- 12
Thank you very much. That worked great!


Reply With Quote