Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:file': 0.07; 'cc:addr:python-list': 0.11; 'question.': 0.14; 'background,': 0.16; 'command:': 0.16; 'dest': 0.16; 'did,': 0.16; 'dig': 0.16; 'for,': 0.16; 'i.e.,': 0.16; 'invoking': 0.16; 'paulo': 0.16; 'specifying': 0.16; 'src': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'pfxlen:0': 0.19; 'meant': 0.20; 'not,': 0.20; 'help.': 0.21; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'expanded': 0.24; 'subject:like': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'read,': 0.26; 'asking': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'unix': 0.29; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; 'assumes': 0.31; 'file': 0.32; 'figure': 0.32; 'option': 0.32; 'point.': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'leads': 0.36; 'skip:- 10': 0.38; 'pm,': 0.38; 'enough': 0.39; 'easy': 0.60; "you're": 0.61; 'kind': 0.63; 'more': 0.64; 'worth': 0.66; 'prompt': 0.68; 'behavior': 0.77; 'complaint': 0.84; 'researching': 0.84; 'cutting': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=t4MevJ5ZvyisQxyaFoGRw8NrQjAoL3hBSjX9w8LxqMc=; b=03rPQzTXfC33eUgp10NesZBOAOYDbAGiOC5dadndMQmzH5q/dNzDCZMSrnYYAeoj6Y CsgACcfEIh9KNQ+osI0lGvyHRa2+HHaghQcwaBxJo4iz7BDfmUyykzbOpKqLf5a37BIR rj9ggN0BdZNxh8mnxVgEvcf1zgxQdDzOkBseIB9gsJUBK4zAANe1aDD3Sv7XkXJeqv7y B9RvSq+wrF9Bg4CXM10xLJLj5M2ag71/t9t4i/7nCZ+BeZNqH92OYMF6NOae43IB/OH1 yOKocrtysOdas8MrzbItuOKI9Wq3vlspfAP5jQQZ+sTH1Ow+fchJT8PmfzmrQbGNiC+x Nqww== MIME-Version: 1.0 X-Received: by 10.67.21.226 with SMTP id hn2mr36382925pad.69.1387395794349; Wed, 18 Dec 2013 11:43:14 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Dec 2013 14:43:14 -0500 Subject: Re: Copy a file like unix cp -a --reflink From: Jerry Hill To: Paulo da Silva Content-Type: text/plain; charset=UTF-8 Cc: "python-list \(General\)" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387395803 news.xs4all.nl 2904 [2001:888:2000:d::a6]:54555 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62333 On Wed, Dec 18, 2013 at 1:37 PM, Paulo da Silva wrote: > Hi! > > Is there a way to copy a file the same as Unix command: > > cp -a --reflink src dest > > without invoking a shell command? I started to dig through the cp man page to see what that did, then gave up when each option expanded out to several more. i.e., "-a, --archive same as -dR --preserve=all" leads to looking up -d -R and --preserve, etc. To me, it's just not worth it to spend more time researching your question than you spent writing the email asking it. If you don't get the answers you're looking for, you might try asking again, specifying the exact behavior you'd like to achieve. PS: That isn't really meant as any kind of complaint about your question. It's consise, easy to read, and gets right to the point. It just assumes a lot of background knowledge. If someone else happens to already know all of that background, they may be able to help right off. If not, they may be interested enough to do the research to figure it all out and then help. You just may be able to prompt more people to help by cutting down on the amount of work it would take them to do so. -- Jerry