Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
114
rated 0 times [  114] [ 0]  / answers: 1 / hits: 100800  / 2 Years ago, fri, august 5, 2022, 1:56:37

I've bunch of folders in folder A. I want to move files from all those folders to A.



Or



I want to cut all files from child folders and paste them in parent folder.



How to do that?


More From » bash

 Answers
4

Go to your A directory and run



find . -mindepth 2 -type f -print -exec mv {} . ;


which means "find all files in this directory and its sub-directories and execute mv with target directory . for each file found to move them to current directory.


[#37862] Sunday, August 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
repend

Total Points: 195
Total Questions: 113
Total Answers: 107

Location: Nicaragua
Member since Tue, Dec 8, 2020
3 Years ago
;