I've little inconvenience while copying image files from another Android Project to my current one.Suppose I've files called nice_little_icon.png in each of the directories drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi and drawable-xxhdpi, which are under res directory of Project1.Now how do I copy these files into project2's res directory using single Linux/Unix command?so my end result will look likeProject1/../res/drawable-ldpi/nice_little_icon.png -> Project2/../res/drawable-ldpi/nice_little_icon.pngProject1/../res/drawable-mdpi/nice_little_icon.png -> Project2/../res/drawable-mdpi/nice_little_icon.pngProject1/../res/drawable-hdpi/nice_little_icon.png -> Project2/../res/drawable-mdpi/nice_little_icon.pngProject1/../res/drawable-xhdpi/nice_little_icon.png -> Project2/../res/drawable-xhdpi/nice_little_icon.pngProject1/../res/drawable-xxhdpi/nice_little_icon.png -> Project2/../res/drawable-xxhdpi/nice_little_icon.png
How to copy multiple files with a same name from children directory to another directory without losing the parent directory?
file copy
You can use the pax command (a standardized replacement for tar and cpio). This command is present on all POSIX-compliant systems, but beware that some Linux distributions omit it from their default installation. pax copies each path under the destination directory.pax -rw -pe drawable-*/nice_little_icon.png ../../Project2/res/Instead of relying on wildcards in the shell, you can use the -s option to ignore some files.pax -rw -pe -'s!^drawable-[^/]*/nice_little_icon\.png$!&!' -'s!.*/.*!!' drawable-* ../../Project2/res/