df -h
-h
옵션은 사람이 읽기 쉬운 형식으로 출력합니다.du -sh /path/to/directory
-s
: 요약 정보만 표시-h
: 사람이 읽기 쉬운 형식으로 출력# 로그 파일 압축
find /var/log -type f -name "*.log" -mtime +7 -exec gzip {} \;
# 오래된 압축 로그 삭제
find /var/log -type f -name "*.gz" -mtime +30 -delete
# 7일 이상 된 파일 삭제
find /tmp -type f -atime +7 -delete
# APT 캐시 정리 (Ubuntu/Debian)
apt-get clean
# YUM 캐시 정리 (CentOS/RHEL)
yum clean all
# 큰 파일 찾기
find /home -type f -size +100M
# 환경 목록 확인
conda env list
# 환경 제거
conda env remove --name 환경이름
conda clean --all
# 사용하지 않는 패키지 제거
conda clean --packages
# 30일 이상 된 venv 디렉토리 찾기
find /path/to/venv/directory -maxdepth 1 -type d -mtime +30
# 필요없는 venv 삭제
rm -rf /path/to/venv/환경이름
# 설치된 버전 확인
nvm ls
# 사용하지 않는 버전 제거
nvm uninstall 버전번호
apt-get clean
(Ubuntu/Debian)apt-get autoremove
(Ubuntu/Debian)tar -cvzf archive.tar.gz /path/to/directory
fdupes -r /path/to/search
0 2 * * * /path/to/cleanup_script.sh
정기적으로 이 가이드를 따라 SSD 용량을 관리하면 서버의 성능과 안정성을 유지할 수 있습니다.
이 가이드를 따라 정기적으로 SSD 용량을 관리하면 서버의 성능과 안정성을 유지할 수 있습니다. Virtual environment와 주요 시스템 디렉토리를 꾸준히 관리하는 것이 중요합니다.