Linux2019. 4. 18. 10:48

*/5 로 설정해서 5분 마다 실행하게 했는데

두개를 동시에 해놨더니 공유문제 생겨서 하나는 실행을 못한다고 에러가 잔뜩 쌓였다.

 

그래서 5분 주기로 실행하되, 2분 차이를 두고 해보려니

*은 0-59와 같은 의미이고

 

*/5

3-59/5

이런식으로 두개를 해두면

하나는 정각부터 시작해서 5분 간격

다른 하나는 3분 부터 시작해서 5분 간격으로 된다고 한다.

일단은 걸어놨으니 기다려 봐야 할 듯

[링크 : https://stackoverflow.com/questions/12786410/run-cron-job-every-n-minutes-plus-offset]

'Linux' 카테고리의 다른 글

systemctl restart 시그널  (0) 2019.04.23
ata1 comreset failed (errno=-16)  (0) 2019.04.19
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
tar 에서 파일 삭제하기  (0) 2019.03.04
sparse file 확인하기  (0) 2019.02.25
Posted by 구차니
Linux2019. 4. 18. 10:24

$ sudo yum install fdupes

 

결과 자체는 별건 없고

같은 파일들 끼리 묶어서 출력해준다.

 

[링크 : https://itsfoss.com/find-duplicate-files-linux/]

'Linux' 카테고리의 다른 글

ata1 comreset failed (errno=-16)  (0) 2019.04.19
crontab 실행 시간 조절하기  (0) 2019.04.18
tar 에서 파일 삭제하기  (0) 2019.03.04
sparse file 확인하기  (0) 2019.02.25
cron 실행 및 시간 관련 문제  (0) 2019.02.24
Posted by 구차니
Linux/centos2019. 3. 20. 10:59

언제나 그렇듯 selinux는 만악의 근원이구만?


80번 포트가 아닌 다른 포트를 쓰려고 할때 httpd 데몬이 실행안되는 경우

(아래는 5000번 포트를 웹 서버로 쓰려고 할 경우)

# semanage port -m -t http_port_t -p tcp  5000

# semanage port -a -t http_port_t -p tcp  5000

[링크 : http://egloos.zum.com/dochi575/v/4867779]

[링크 : https://stackoverflow.com/questions/17079670/]


php 페이지가 열리지 않을 경우

# ls -Z

# sudo chcon -t httpd_sys_content_t /var/www/html -R

[링크 : https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-writeaccess-file-no-matter-what/]


'Linux > centos' 카테고리의 다른 글

리눅스 로그인 실패 로그  (2) 2019.07.07
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
'abrt-cli status' timed out  (0) 2019.03.01
centos nfs client  (0) 2019.02.27
centos timezone 변경  (2) 2019.02.23
Posted by 구차니
Linux2019. 3. 4. 15:45

설마 없겠냐 했는데 다행히도 있네


$ tar --list --file=collection.tar

blues

folk

jazz

rock

$ tar --delete --file=collection.tar blues

$ tar --list --file=collection.tar

folk

jazz

rock 

[링크 : https://unix.stackexchange.com/questions/68732/remove-files-from-tar-archive]

[링크 : https://www.gnu.org/software/tar/manual/html_node/delete.html]



+

sparse 파일을 건드렸더니

tar: 다음 헤더로 건너 뜀

tar: 아카이브에서 비헤더 부분을 제거함 

이런 에러가 뜨더니 파일을 망가트려버렸다 -_ㅠ

'Linux' 카테고리의 다른 글

crontab 실행 시간 조절하기  (0) 2019.04.18
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
sparse file 확인하기  (0) 2019.02.25
cron 실행 및 시간 관련 문제  (0) 2019.02.24
linux multi core 압축  (0) 2019.02.22
Posted by 구차니
Linux/centos2019. 3. 1. 13:07

볼륨 복사한다고 했더니 가상머신이 골골대서

로그인 오래걸리더니 다음과 같은 에러를 뿜어낸다

'abrt-cli status' timed out 


일단 abrt 로그인 시에 확인하지 않도록 해서 끄는 방법이 먼저 나오네..

[링크 : https://blog.inidog.com/p/20170203182]


+

버그 리포팅 툴이라..

Automatic Bug Reporting Tool; ABRT, abrtd

[링크 : https://zetawiki.com/wiki/리눅스_ABRT]

'Linux > centos' 카테고리의 다른 글

centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
httpd + php + selinux..  (0) 2019.03.20
centos nfs client  (0) 2019.02.27
centos timezone 변경  (2) 2019.02.23
svn on centos  (0) 2019.02.22
Posted by 구차니
Linux/centos2019. 2. 27. 17:42

centos 에서 nfs 마운트 하려는데 에러나면

# mount -t nfs 0.0.0.0:/ temp

mount: wrong fs type, bad option, bad superblock on 0.0.0.0:/,

       missing codepage or helper program, or other error

       (for several filesystems (e.g. nfs, cifs) you might

       need a /sbin/mount.<type> helper program)


       In some cases useful info is found in syslog - try

       dmesg | tail or so. 


nfs 패키지를 깔아줘야 한다. (망할!)

# yum install nfs-utils nfs-utils-lib


[링크 : https://moongblog.tistory.com/9]

'Linux > centos' 카테고리의 다른 글

httpd + php + selinux..  (0) 2019.03.20
'abrt-cli status' timed out  (0) 2019.03.01
centos timezone 변경  (2) 2019.02.23
svn on centos  (0) 2019.02.22
smb on centos  (0) 2019.02.13
Posted by 구차니
Linux2019. 2. 25. 18:19

두개 실행해서 용량 다르게 나오면 sparse file인걸로 보면 될 듯?

$ du -h *

$ ls -alh 

[링크 : https://stackoverflow.com/.../c-linux-sparse-file-how-to-check-if-file-is-sparse-and-print-0-filled-disk-bl]

[링크 : https://www.thegeekdiary.com/how-to-find-all-the-sparse-file-in-linux/]

'Linux' 카테고리의 다른 글

디렉토리내 중복 파일 확인하기  (0) 2019.04.18
tar 에서 파일 삭제하기  (0) 2019.03.04
cron 실행 및 시간 관련 문제  (0) 2019.02.24
linux multi core 압축  (0) 2019.02.22
bash history 번호 옆 *  (0) 2019.02.16
Posted by 구차니
Linux2019. 2. 24. 19:49

log를 보는데 centos 처음 설치시에 EST로 되어있어서 KST로 변경해주고 나는데도

여전히 다른 시간으로 기록되는게 보여서 검색해보니


timezone 바꾸고 rsyslog와 crond 둘다 재시작을 해주어야 한다.

(생각을 해보니 crond를 재기동 안했던 듯?)

# systemctl restart rsyslog

# systemctl restart crond 

[링크 : https://unix.stackexchange.com/questions/352338/]


아무튼 아래와 같이 17시간 차이 나던게 수정되었다.

Feb 24 05:42:50 localhost crontab[37732]: (root) END EDIT (root)

Feb 24 05:42:59 localhost crontab[37735]: (root) LIST (root)

Feb 24 05:43:01 localhost crond[36237]: (root) RELOAD (/var/spool/cron/root)

Feb 24 19:45:55 localhost crond[36237]: (CRON) INFO (Shutting down)

Feb 24 19:45:55 localhost crond[37779]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 72% if used.)

Feb 24 19:45:55 localhost crond[37779]: (CRON) INFO (running with inotify support)

Feb 24 19:45:55 localhost crond[37779]: (CRON) INFO (@reboot jobs will be run at computer's startup.) 


+

그리고 5분 간격으로 실행하기

*/5 * * * * command 


[링크 : https://okky.kr/article/260987]

[링크 : https://zetawiki.com/wiki/크론탭_작업_5분마다_수행]

'Linux' 카테고리의 다른 글

tar 에서 파일 삭제하기  (0) 2019.03.04
sparse file 확인하기  (0) 2019.02.25
linux multi core 압축  (0) 2019.02.22
bash history 번호 옆 *  (0) 2019.02.16
네트워크 속도 모니터링  (0) 2019.02.03
Posted by 구차니
Linux/centos2019. 2. 23. 11:26
의외로 간단하게 변경이 가능하다.

# timedatectl list-timezones | grep -i seoul

# timedatectl set-timezone Asia/Seoul 

[링크 : https://www.fun25.co.kr/blog/linux-centos-7-change-timezone/?category=001]

'Linux > centos' 카테고리의 다른 글

'abrt-cli status' timed out  (0) 2019.03.01
centos nfs client  (0) 2019.02.27
svn on centos  (0) 2019.02.22
smb on centos  (0) 2019.02.13
centos backup  (0) 2019.02.13
Posted by 구차니
Linux/centos2019. 2. 22. 16:03

흐음.. git으로 변환해주어야 하려나? 고민중..


[링크 : https://blog.hanumoka.net/2018/04/30/centOs-20180430-centos-install-subversion/]

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=6979749]


+

저장소의 format 파일을 접근할 수 없다고 나오면 selinux를 설정해주어야 한다.

chcon -R -t svnserve_content_t /svn 

[링크 : http://jryeong.blogspot.com/2013/12/cenos-svn.html]

'Linux > centos' 카테고리의 다른 글

centos nfs client  (0) 2019.02.27
centos timezone 변경  (2) 2019.02.23
smb on centos  (0) 2019.02.13
centos backup  (0) 2019.02.13
centos epel 저장소 추가  (0) 2019.02.13
Posted by 구차니