Giorgos Keramidas wrote:

 > On 2002-01-21 09:22:08, [EMAIL PROTECTED] wrote:
 >
 >>5) In -current would it be possible to have a few command line
 >>switches added to certain userland utilities?  I noticed -h made it
 >>into `ls` now, but `cp` still doesn't have -a or -x which I used to
 >>use all the time in Linux.  I know -a isn't a big deal but - x was
 >>definitely nice from time to time.
 >>
 >
 > What does the -a or -x option do for the ls(1) command of Linux?
 > Perhaps equivalent options do already exist in FreeBSD ls(1).
 >


   Sorry for the confusion there :-)  The -a and -x options are meant 
for cp(1).  The -a (--archive) option in cp(1) for linux (which I am 
fairly certain is the gnu version) is essentially an easy way to safely 
do -dpR automatically.  So effectively -a (--archive) preserves links, 
tries to preserve permissions, and also does a recursive copy.  The -x 
(--one-file-system) option in cp(1) for linux says that if you have 
multiple file systems mounted on top of / and you do a `cp -ax / 
/mnt/copy/of/root/.` it should only copy the directory stubs for the 
mounts instead of the mounts themselves.  I have found both of these 
options to be extremely useful at times.


 >
 >>`date` having a --date option to tell you when a specified date is
 >>in Linux is also very nice.  Just some thoughts.
 >>
 >
 > If I haven't misunderstood you on this, FreeBSD's date(1) can already
 > do what you want, although I have to admit that it works a bit
 > differently than Linux's date(1).
 >
 > I've recently used date(1) -j and -f options to convert arbitrary
 > dates to the local timezone in a script I wrote to print the
 > modification date of problem reports.  You might want to check the
 > scripts at:
 >
 >      http://people.FreeBSD.org/~keramida/pr/feedback/
 >
 > for samples of using date(1) to convert between timezones and date
 > representations.  A small example that will probably help you
 > understand how this is done (combined with the description of the -j
 > and -f options in the date(1) manual page) is shown below:
 >
 >      hades!charon:[/home/charon]% date '+%s => %T %Z'
 >      1011645430 => 22:37:10 EET
 >      hades!charon:[/home/charon]% TZ=UTC date -j -f '%s' 1011645328 '+%s => 
%T %Z'
 >      1011645328 => 20:35:28 GMT
 >


   Again, sorry for the misunderstanding and not providing enough 
information upfront.  In linux date(1) is the gnu version of date, which 
means you can do the following `date --date 'Jan 22 2002'` and it would 
output the following:

Tue Jan 22 00:00:00 CST 2002

   Or I could do a `date --date '2 days ago'` and it would output:

Sun Jan 20 00:46:30 CST 2002

   Again, this option might not be the most useful thing in the world 
but I know that I have used it many times at home and at work to make 
scripts less complicated.


 > Cheers,
 >
 > --
 > Giorgos Keramidas . . . . . . . . . 
keramida@{ceid.upatras.gr,freebsd.org}
 > FreeBSD Documentation Project . . . http://www.freebsd.org/docproj/
 > FreeBSD: The power to serve . . . . http://www.freebsd.org/
 >
 >

   Thank you for the response and let me know if you need any further 
information to be able to tell what the options I was refering to for 
cp(1) and date(1) actually do.

Jordan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to