coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils] -avrd option ?


From: Eric Blake
Subject: Re: [coreutils] -avrd option ?
Date: Mon, 20 Sep 2010 08:38:50 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3

On 09/20/2010 05:22 AM, Yann wrote:
Dear all,

I searched into "man cp" and the online manual, but did not find any clue...

What is the meaning of -avrd option after cp command ? (Is it the same
as -a option ?)

POSIX requires support for option-letter compression, and GNU tools obey this by virtue of getopt_long(). That is:

cp -avrd

is strictly equivalent to:

cp -a -v -r -d

The basic rule of thumb is that you can omit ' -' after any short option that does not take an argument and which is followed by another short option. And for short options that take mandatory arguments, such as cp -t, you can omit the space between the option and its argument, so these are the same:

cp -a -t . foo
cp -at. foo

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]