Article 58VW8 copying file with like tree structure

copying file with like tree structure

by
Skaperen
from LinuxQuestions.org on (#58VW8)
before i create something of my own to do this (it will be a largish project done mostly in Python), i'd like to know if there are any tools or scripts or programs around that can copy a file from tree 1 to tree 2 when a path is given of a file within tree 1 and retain its relative path in the 2nd tree. that is, if i call it copytree, then this command:
Code:copytree treeone treetwo foo/bar/source/main.cwill create treetwo/foo, treetwo/foo/bar, treetwo/foo/bar/source, and copy file main.c from treeone/foo/bar/source to treetwo/foo/bar/source. if thsoe directories already exit, such as from a previous file being copied, then it will just use what is there (not an error). the idea is that i want to create an archive of my big messy home directory, one or a few files at a time,, while retaining the original structure as it is done.latest?d=yIl2AUoC8zA latest?i=ZO4MsbFMdl4:_AICEV0FIRE:F7zBnMy latest?i=ZO4MsbFMdl4:_AICEV0FIRE:V_sGLiP latest?d=qj6IDK7rITs latest?i=ZO4MsbFMdl4:_AICEV0FIRE:gIN9vFwZO4MsbFMdl4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments