리눅스에서 복구가 어렵도록 안전하게 파일을 삭제하는 방법입니다.

scrub, shred 와 wipe 프로그램을 이용하면 됩니다.

 

1. scrub

scrub 파일이름
scrub -r 파일이름  # scrub 후에 파일을 삭제
scrub /dev/sdf1  # 파티션 전체에 대해서 scrub
scrub -X 디렉토리 # 디렉토리를 생성하고 파티션이 가득찰 때 까지 파일을 채운다. 빈 공간에 대해서 쓰레기 데이터를 채울때 사용

 

2. shred

shred 파일이름
shred -u 파일이름    # 덮어쓰기 후, 파일을 삭제
shred /dev/sdf1
shred -v /dev/sdf1 # 진행상황표시
shred -v --random-source=/dev/urandom -n1 /dev/sdf1 # /dev/sdf1 파티션에 랜덤 데이터를 씀

 

3. wipe

wipe 파일이름
wipe -r 디렉토리

 

 

 

* 참고사이트

https://wiki.archlinux.org/title/Securely_wipe_disk#shred
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec-removing_data_securely_using_scrub

728x90
반응형

+ Recent posts