file archiving

VLD/VMB gwyn at BRL.ARPA
Tue Aug 6 07:04:50 AEST 1985


$ # How to archive then delete user files not accessed for 90 days:
$ su
Password:
# cd name-of-user-filesystem
# find . ! -atime 90 -depth -print >/usr/tmp/FILELIST	# find files
# # (The above two can be combined if you like
# #  absolute pathnames in your tape archive.)
# cpio -ocB </usr/tmp/FILELIST >/dev/rmt/0m		# make tape
# cpio -icBtv </dev/rtm/0m | lp &			# print TOC
# while read file
> do	rm -f "$file"					# delete files
> done </usr/tmp/FILELIST
# exit
$



More information about the Comp.unix mailing list