سؤال

Say I have a folder with five files and one folder. What would be the linux terminal command to move all those files into that one sub-folder?

I've tried find . -maxdepth 1 -type f -exec mv {} destination_path \; but I get the error find: missing argument to -exec

هل كانت مفيدة؟

المحلول 2

It's simply:

mv * destination_path

نصائح أخرى

Try doing this :

( shopt -s extglob; mv !(destination_path) destination_path )
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top