Unix/Linux/MacOS
Non-interactive 리눅스 패스워드 변경
CentOSecho ‘test1:Pass!235’ | chpasswdecho ‘Pass!234’ | passwd –stdin test1 Ubuntuecho ‘test1:Pass!235’ | chpasswd
Non-interactive 리눅스 패스워드 변경 더 읽기"
[ipTimeNAS1Dual] CloudBackup (rsync)
echo ‘<mypassword>’ > /root/pw.txtchmod 600 /root/pw.txtrsync -avrz –delete –force –port=1873 –password-file=”/root/pw.txt” –log-file=rsync.log “share@10.10.10.2::share” “/mnt/share”
[ipTimeNAS1Dual] CloudBackup (rsync) 더 읽기"
파일 분할 및 합치기 (split)
파일 분할하기 split -d -a 4 -b 524288000 original_file split_ -d: 분할된 파일명 뒤에 연속적인 숫자를 붙여라-a 4: 숫자는 4자리로-b 524288000: 500MB 단위로 분할한다.original_file: 원본 파일명split_: 분할된 파일의 파일명 PREFIX >>분할 결과524288000 Nov 16 14:10 split_0000524288000 Nov 16 14:11 split_0001234883892 Nov 16 14:11 split_0002※원본은 그대로 유지된다. 파일 합치기cat split_* > original_file.copy 합친 파일 비교diff original_file
telnet으로 SMTP 테스트
telnet mail.esvali.com 25 HELO 127.0.0.1。。。MAIL FROM:hasu0707@daum.net。。。RCPT TO:hasu0707@naver.com。。。DATAsubject: helloTEST MAIL.。。。quit
lcdproc 설치
소스코드 다운로드: http://www.lcdproc.org/ ./configure –prefix=/usr –enable-drivers=allmakemake install cp -fv LCDd.conf /etc/sed -i “s/DriverPath=server\/drivers\//DriverPath=\/usr\/lib\/lcdproc\//g” /etc/LCDd.confchown -R nobody:nobody /usr/lib/lcdproc /etc/LCDd.conf echo “[Unit]” > /usr/lib/systemd/system/LCDd.serviceecho “Description=LCDd display daemon” >> /usr/lib/systemd/system/LCDd.serviceecho “Documentation=man:LCDd(8) http://www.lcdproc.org/” >> /usr/lib/systemd/system/LCDd.serviceecho “After=multi-user.target” >> /usr/lib/systemd/system/LCDd.serviceecho “” >> /usr/lib/systemd/system/LCDd.serviceecho “[Service]” >> /usr/lib/systemd/system/LCDd.serviceecho “Type=simple” >> /usr/lib/systemd/system/LCDd.serviceecho “ExecStart=/usr/sbin/LCDd -s 0 -f -c /etc/LCDd.conf” >> /usr/lib/systemd/system/LCDd.serviceecho “User=root” >> /usr/lib/systemd/system/LCDd.serviceecho “TimeoutStopSec=1s”
polkit error
“unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files” 오류 발생 시… 퍼미션 점검cd /chown root:root .chmod 755 . 실행 후 ls -al / 하여 .과 ..의 퍼미션 확인
rpm 옵션 정리
1. 설치 모드 -i : 패키지 최초설치 시 사용, 이전버전 있으면 설치안됨 -U : 패키지가 설치되어 있지 않다면 설치, 설치되어 있다면 업그레이드 -v : 설치과정을 출력 -h : 설치진행과정을 특수문자”#”으로 표시 -F : 이전 버전이 설치된 경우에만 설치, 업데이트라고 볼 수 있음 –force : 기존에 설치된 패키지와 그 파일을 강제로 다시 설치하도록 함 –nodeps :
