Answer the question
In order to leave comments, you need to log in
How to move files from a folder containing a certain string to another folder?
Help:
there are many (several hundred thousand) files in the folder and in subfolders, you need to find those files that contain a line like XXX=QWERTY and move them to another folder!
Answer the question
In order to leave comments, you need to log in
cd source_directory_name ; grep -rlZ 'XXX=QWERTY' . | xargs -0 -I{} mv \{} dir_name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question