리눅스에서 휴지통 (safedelete)
safedelete 를 통하여 리눅스 박스에 휴지통 만들기
http://rpmfind.net/linux/rpm2html/search.php?query=safedelete 에서
safedelete-1.3-6.src.rpm 을 다운받는다
root]#rpm -Uvh safedelete-1.3-6.src.rpm
root]#cd /usr/src/redhat/SOURCES
root]#mkdir -p /root/temp/safedelete
root]# mv * /root/temp/safedelete/
root]#cd /root/temp/safedelete
root]# tar xvfz safedelete-1.3.tar.gz
root]#tar xvfz safedel-1.3-patch.tar.gz
root]#cp safedelchk.c safedelete-1.3
root]#cp *.patch safedelete-1.3
root]# cd safedelete-1.3
root]# cp Makefile.LINUX Makefile
root]#patch -p1 < ./safedelete-1.3-glibc.patch
root]#patch -p1 < ./safedelete-1.3-y2k.patch
root]#patch undelete.c safedelete-1.3-redhat.patch
root]#patch Makefile safedelete-1.3-config.patch
root]#patch Makefile safedelete-1.3-makefile.patch
root]#make
root]#make install
.bashrc 에 다음 삽입
alias rm='/usr/bin/safedelete'
alias purge='/bin/rm'
export SAFEDAYS=7 # 7일간 보관하라
safedelchk
.safedelete.log 에 지운파일 정보를 보관
따라서, .safedelete.log를 보고 파일을 복원시키고자 할때
undelete 파일명 의 형식으로 복원함