Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ how to just copy the folder not the file

Posted by: ytyyutianyun Nov 19 2011, 05:30 AM

for example:


jizhen
parallel double cylinder
shuipingdanyuanzhu
shuzhidanyuanzhu
vertical double cylinder

./jizhen:
wujizhen

./jizhen/wujizhen:
171
80
xin129
xin80

./jizhen/wujizhen/171:
0000.txt
000100.txt
000101.txt
000102.txt
000103.txt
000104.txt
000105.txt
000106.txt
000107.txt
....



I only want to copy the "./*" not the "000*.txt"
thanks.

Posted by: michaelk Nov 19 2011, 07:25 AM

I assume the answer on LinuxQuestions was sufficient.

rsync -av --include '*/' --exclude '*' /path/to/source /path/to/destination

Posted by: ytyyutianyun Nov 20 2011, 06:23 PM

QUOTE (michaelk @ Nov 19 2011, 07:25 AM) *
I assume the answer on LinuxQuestions was sufficient.

rsync -av --include '*/' --exclude '*' /path/to/source /path/to/destination


thanks, I ask the same question in both sites because I am very anxious

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)