really, really simple question

really, really simple question

Post by Dean Lava » Wed, 20 Aug 1997 04:00:00



I can't remeber how to append the date to a file in order to archive it.
ie: move file1 to file1.190897

any suggestions on the syntax would be appreciated.

cheers

Dean

 
 
 

really, really simple question

Post by Nasse » Wed, 20 Aug 1997 04:00:00



Quote:

>I can't remeber how to append the date to a file in order to archive it.
>ie: move file1 to file1.190897

>any suggestions on the syntax would be appreciated.

how about

mv file1 file1."`date`"

Nasser

 
 
 

really, really simple question

Post by larry d. clar » Thu, 21 Aug 1997 04:00:00



>I *really* wish that people would actually check the advice that they >give out here first before posting it. The above suggestion is a half >answer.

sounds like excellent advise.

Quote:> The important thing to note is that mv doesn't work across file system
> boundries, so you maybe better off using cp.

straight from the man page for mv:

NOTES
     If source and target_dir are on different file  systems,  mv
     copies the file and deletes the original; any links to other
     files are lost.

maybe you are thinking about ln

--
Fragen Sie nicht, was Ihr Computer fuer Sie tun kann, aber
Fragen Sie, was Sie fuer Ihren Computer tun koennen.

 
 
 

really, really simple question

Post by Nasse » Thu, 21 Aug 1997 04:00:00





>>>I can't remeber how to append the date to a file in order to archive it.
>>>ie: move file1 to file1.190897

>>how about
>>mv file1 file1."`date`"

>*sigh*

>I *really* wish that people would actually check the advice that they give
>out here first before posting it.
...

>The important thing to note is that mv doesn't work across file system
>boundries, so you maybe better off using cp.

huh? mv does not work across file system boundaries? The best answer
I can give for this is to use your own words:

Quote:>I *really* wish that people would actually check the advice that they give
>out here first before posting it.

Nasser
 
 
 

really, really simple question

Post by Chip Campbel » Fri, 22 Aug 1997 04:00:00





> says...
> >>I can't remeber how to append the date to a file in order to archive
> it.
> >>ie: move file1 to file1.190897
> ... we can use:

>  % mv file1 file1."`date +%d%m%Y`"
>  % ls
>  file1.20081997

> The important thing to note is that mv doesn't work across file system

> boundries, so you maybe better off using cp.

Consider `date +%Y%m%d`. Then an alphabetically sorted list of your
files (like ls) will show them in date order. Also it's unambiguous to
non-US users, which may be irrelevant in your context.

Chip Campbell
Sony Electronics, San Jose, California

 
 
 

1. Really, really stupid ifconfig question :-)

Hello!

How do I set the configuration in rc.conf for my NIC to use DHCP and
10mbit full duplex?

ifconfig_xl1="DHCP" calls for 'dhcpclient xl1' right?

And

ifconfig_xl1="media 10baseT/UTP mediaopt full-duplex" is the same as
running ifconfig 'by hand'.

But the last of these two lines in rc.conf seem to nullify the line
above. So I can only get one but not the other.

I think I've probably tried everything except for the most obvious!
:-)

Thanks,
Mathias.

2. What is Alpha Powered, Inc.?

3. A really really dumb question...

4. netstat -i field Opkts ==0

5. OpenSSH 3.0 really brief (and maybe really dumb) question...

6. Linksys Ether16 Help

7. Really, REALLY stupid question...

8. ANN: bras-2.2 rule based command execution

9. Really, really newbie questions

10. really simple question (almost felling stupid asking)

11. Really simple apache 2 question

12. Networking question (really simple?)

13. Probably really simple wtmp question