2

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

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

but it seemed not working.

3

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.

| improve this answer | |
2

Just as an alternative, try this

 cp <path>/*.png <destination-dir>

Notice the space between the *.png and destination-dir. Try to only use/append sudo as a prefix if the files your trying to access are restricted to root or other users inaccessible to you directly.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.