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?
If there are only the files (and the directory target) in your directory, simply use
It will complain that 'target' can't be moved on itself, but the files will all be in target afterwards.
This works as well:
One of the key advantages of
You could perhaps go with something like:
Or as James points out you could trim down the find command to only look at files... And as LoremIpsum pointed out if there are billions of them, using