Categories
Finding and replacing a file?
How to find all files named file.txt in the /var/ folder and subfolders and replace them with the file /root/file-new.txt
Answer the question
In order to leave comments, you need to log in
in addition to the previous
find /var/ -name 'file.txt' -exec cp /root/file.txt {} \;
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question