Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 5517  / 2 Years ago, sat, october 29, 2022, 4:47:13

I have 100 files in a single folder including a folder called "target." I want to migrate all the files in this folder into the folder target (except for the target folder itself).



Is there an efficient terminal command to do this?


More From » files

 Answers
0

If there are only the files (and the directory target) in your directory, simply use mv, rather than find:



mv * target


It will complain that 'target' can't be moved on itself, but the files will all be in target afterwards.


[#39605] Saturday, October 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dresuitable

Total Points: 69
Total Questions: 116
Total Answers: 122

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
dresuitable questions
Sat, May 15, 21, 04:38, 3 Years ago
Fri, Apr 14, 23, 09:53, 1 Year ago
Tue, May 16, 23, 18:13, 1 Year ago
Sun, Apr 24, 22, 12:59, 2 Years ago
;