HOW TO PRESERVE THE DATE AND TIME STAMP ATTRIBUTES WHEN USING THE 'cp' COMMAND WITH FREEBSD
ASSUMPTIONS:
You have already installed FreeBSD. If not, then
click here:
How to Install FreeBSD
COPYING FILES WITHOUT DESTROYING THE DATE AND TIME STAMP
- It's kind of bizarre, but when you copy files with the
'cp' command in FreeBSD, the 'modified' date and time are
bumped up to the current date and time. This is
really annoying if you depend on the information that the
modified time stamp gives you.
The workaround is simple: just add the '-p' (P)reserve
option whenever you use the 'cp' command, and it will
preserve the modified date and time, as well as all
the other file attributes and permissions:
cp -p /sourcedir/somefile.txt /targetdir/newname.txt
Be aware that the 'accessed' date will change, however
Here are some other FreeBSD related links:
How to Install FreeBSD
Shell Configuration
FreeBSD Device List
Hardware
Burn-In Test Using FreeBSD
FreeBSD
Commands Cheat Sheet
'make
install' fails on FreeBSD
The
FreeBSD 'Handbook' online
Search
for Answers to Questions about FreeBSD
How
to Install NTP (Network Time Protocol) software on FreeBSD
How
to Install Samba file server software on FreeBSD
Mounting
and Using the Floppy Drive in FreeBSD
Mounting
and Using the CD-ROM Drive in FreeBSD
How to Find or Search for a Directory or a file
How to Preserve the Date and Time Stamp When Copying Files
How to Copy Files, and Directories recursively in FreeBSD / unix
How To Fix The 'Read Only File System' Problem When rc.conf is Corrupted on Freebsd
Random Passwords Generator
URL Decoder / Link Maker
AT YOUR OWN RISK: These instructions have no guarantee or
warrantee of fitness for any purpose whatsoever--and none
shall be implied or inferred. If you use these
and incur any kind of damage--it is your responsibility.
FreeBSD How to Keep and Preserve the Date and Time Stamp Attributes When Copying Files - Using the cp Command to Copy Files, but Preserving the Dates and Times, Configuration, Linux, Unix, Nix, Hard Disks, CD, Keyboard, Cheat Sheet for FreeBSD, Configure, Options, Configuration, Howto, How To, FreeBSD
|
|
|