Sunday, April 28, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 10025  / 2 Years ago, thu, march 31, 2022, 12:11:13

I want to copy all my .png file to particular directory by using:



cp ...../*.png $pwd   


but it seemed not working.


More From » command-line

 Answers
1

Try this command,



for i in /path/*.png; do sudo cp $i /path/to/destination/directory; done


It will copy all the .png files and paste them to the destination directory.


[#26180] Friday, April 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ularousand

Total Points: 380
Total Questions: 109
Total Answers: 101

Location: England
Member since Tue, Sep 8, 2020
4 Years ago
;