Linux/기본명령어&팁

간혹 파일명이 깨져서 삭제가 안되는 경우가 발생합니다. 이때 파일 인덱스값으로 삭제할수 있습니다. - 파일 인덱스값 확인 # ls -li - ※파일(폴더) 삭제를 진행하기전 삭제하고자 하는 파일(폴더)인지 먼저 확인 # find . -inum 인덱스값(숫자) - 인덱스값으로 파일 삭제 # find . -inum 인덱스값(숫자) -exec rm -f {} \; - 인덱스값으로 폴더 삭제(간혹 한번 실행에 삭제 안되면 한번더 실행하면 삭제됨) # find . -inum 인덱스값(숫자) -exec rm -rf {} \; root@homeserver:~# ls -li total 16 11272422 -rw-r--r-- 1 root root 192 Apr 24 11:40 geoipupdate_script.log ..
- 설치 # yum install nvme-cli - nvme 장치 확인 # nvme --list - nvme smart log확인 (lsblk로 nvme0n1확인) # nvme smart-log /dev/nvme0n1 Smart Log for NVME device:nvme0n1 namespace-id:ffffffff critical_warning : 0 temperature : 27 C available_spare : 100% available_spare_threshold : 10% percentage_used : 0% data_units_read : 50,959 data_units_written : 139,932 host_read_commands : 643,818 host_write_commands ..
█████ ██████ ██████ ██████ ███████ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███████ ██████ ██ ██ ██ █████ █████ ██ ███ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ██████ ██████ ███████ ██ ██████ ██ ██ ██ █████ ██ ██ ██ ███ ██ ███ ███ ██████ ██████ ██████ ██████ ███████ ██ ██ ██ ████ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ ██ ██ ██ ..
https://cron.help/questions Cron Quanadries and Questions -- Cron Helper Cron is a time-based job scheduler that comes default on most Unix like operatings systems and servers. It is designed to run command on a defined schedule. The crontab syntax is commonly used outside of the cron daemon (such as in Kuberenetes CronJobs) to cron.help 0 0 * * Sun [ $(expr $(date +\%W) \% 2) -eq 1 ] && /path/t..
smartctl 설치 # yum install smartmontools 디스크 정보 확인(제조사, 시리얼) # smartctl -i /dev/sdb 백업용으로 만든 조립컴퓨터에 동일모델 디스크 사용중 불량디스크 발생이 날때 교체하기전 시리얼은 한번 확인하고 교체하는것이 좋습니다. 디스크 SMART 정보 확인 # smartctl -A /dev/sdb 디스크 SMART 누적 에러 로그 확인 # smartctl -q errorsonly -H -l selftest -l error /dev/sdb 디스크 SMART정보에 에러가 없을경우 아무런 메세지가 출력되지 않는다. 에러가 있는경우 에러메세지를 출력합니다. https://www.enteroa.com/2016/06/17/smartctl%EC%9D%84-%EC%9..
# cp -rpV --preserve=context /mnt/disk1/www /mnt/disk2/www 웹소스를 다른 경로에 옮기기 위해서는 소유자(nginx:nginx), selinux context(httpd_sys_content_t) 속성도 포함시켜야 합니다. 옵션 -r : 원본위치 하위폴더를 포함해서 복사 -V : verbose -p : 원본파일 모드,소유자,시간정보를 포함해서 복사(mode, ownership,timestamps) --preserve[=ATTR_LIST] : context, link 옵션 https://linuxconfig.org/copy-a-file-while-preserving-selinux-context-on-linux Copy a file while preserving ..
zosystem
'Linux/기본명령어&팁' 카테고리의 글 목록