G
G
garadash2014-11-24 15:22:09
Command line
garadash, 2014-11-24 15:22:09

How to move many files from one directory to another via OSX console?

mv*. * gives a "too many argument" error. There are a lot of files, is there really a limit for copying / moving files by number?
That is, you need to move only the files, and leave the folders. All files in /dir should be moved to /dir/newdir . How to give a command to move only files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2014-11-24
@garadash

You need to use a bunch of find and mv:

cd /dir
find . -maxdepth 1 -type f -exec mv {} /dir/newdir \;

Original answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question