증상) 윈도우 업데이트 시도시 아래와 같은 내용의 창이 뜨면서 실행되지 않는 현상이 발생한다.

창 내용 -> 서비스가 실행되고 있지 않으므로 Windows Update에서 현재 업데이트를 확인할 수 없습니다.
               컴퓨터를 다시 시작해야 할 수도 있습니다.

알려진원인) 윈도우 서비스에 문제가 있어 발생하는 현상이라고 한다.

해결책)

1. 업데이트 서비스 자체가 중지되어 있는 경우

업데이트 서비스가 중지된 경우에도 위와 같은 현상이 발생할 수 있는데 이럴때는 서비스를 다시 기동하면 문제가 해결 될 수 있다.

시작버튼 -> 실행 -> services.msc 입력 후 엔터

Windows Update 서비스 항목이 중지됨 이거나 시작유형이 사용 안 함 으로 되어 있을 경우 이를 시작해준다.

이 후 다시 업데이트를 시도해본다. (업데이트가 시작되면 문제 해결)

2. 업데이트 서비스 기동으로도 해결이 안되는 경우

1번으로 해결이 안되는 경우라면 윈도우 업데이트 폴더 오류 가능성이 매우 높다.

이런경우 업데이트 폴더를 재생성 해주어야 하는데, 우선 1번에 명시된 Windows Update 서비스를 중지시켜준다.

(시작되어 있는 경우라도 반드시 중지할 것)

이후 C:\Windows  경로로 이동하여 SoftwareDistribution 폴더 이름을 다른 이름으로 변경해준다.

폴더 이름은 임의로 지정되도 되지만 어떤 폴더인지 알아 볼수 있도록 지정하는 것이 좋다.

마지막으로 services.msc 에서 Windows Update 서비스를 다시시작하면 자동으로 SoftwareDistribution 가 생성되면서

업데이트가 실행되는 것을 확인 할 수 있다. (이름 변경한 기존 SoftwareDistribution는 삭제할 것)

MySQL 의 기본 스토리지 엔진이 무엇인지 확인하고자 할 때 아래 Query 를 실행 할 것

SQL>SELECT engine, support FROM information_schema.engines WHERE support='DEFAULT';

예시)

mysql> SELECT engine, support FROM information_schema.engines WHERE support='DEFAULT';
+--------+---------+
| engine   | support  |
+--------+---------+
| InnoDB  | DEFAULT |
+--------+---------+
1 row in set (0.03 sec)


 

읽기 가능한 파일(또는 폴더)인지 체크하는 is_readable 함수


bool is_readable ( string $filename )
(PHP 4, PHP 5)

읽기 가능한 파일(또는 폴더)이면 true를 반환하고, 아니면 false를 반환합니다.

예제 (ex #3

 <?php
 
if (is_readable('test.txt'
)) {
    echo 
'읽기 가능한 파일입니다.'
;
 }else{
    echo 
'읽기 권한이 없는 파일입니다. 권한 0707, 0777로 바꿔주세요.'
;
 }
 
?>


쓰기 가능한 파일(또는 폴더)인지 체크하는 is_writable 함수


bool is_writable ( string $filename )
(PHP 4, PHP 5)

쓰기 가능한 파일(또는 폴더)이면 true를 반환하고, 아니면 false를 반환합니다.

예제 (ex #4

 <?php
 
if (is_writable('test.txt'
)) {
    echo 
'쓰기 가능한 파일입니다.'
;
 }else{
    echo 
'쓰기 권한이 없는 파일입니다. 권한 0707, 0777로 바꿔주세요.'
;
 }
 
?>


실행 가능한 파일인지 체크하는 is_executable 함수


bool is_executable ( string $filename )
(PHP 4, PHP 5)

실행 가능한 파일이면 true를 반환하고, 아니면 false를 반환합니다.

예제 (ex #5

 <?php
 
if (is_executable('test.txt'
)) {
    echo 
'실행 가능한 파일입니다.'
;
 }else{
    echo 
'실행 권한이 없는 파일입니다. 권한 0707, 0777로 바꿔주세요.'
;
 }
 
?>


읽기, 쓰기, 실행의 권한 문제에 대한 설명은 퍼미션(Permission) 설정을 참고하십시요.

[출처] : http://blog.habonyphp.com/entry/php-%EC%9D%BD%EA%B8%B0-%EC%93%B0%EA%B8%B0-%EC%8B%A4%ED%96%89%EC%9D%B4-%EA%B0%80%EB%8A%A5%ED%95%9C-%ED%8F%B4%EB%8D%94-%ED%8C%8C%EC%9D%BC%EC%9D%B8%EC%A7%80-%EC%B2%B4%ED%81%AC%ED%95%98%EB%8A%94-%ED%95%A8%EC%88%98#.WA7E9U__qUk



tmpwatch 라는 명령

일정 시간동안 접근이 없는 파일 삭제하기
 

yum -y install tmpwatch


[root@howtounix hack]# ll
total 16
-rwxr-xr-x 1 root root 8486 Aug 24 17:36 a.out
-rw-r--r-- 1 root root 1044 Aug 24 15:42 test.c

24시간 이후로 접근이 없는 파일들 삭제

[root@howtounix hack]# tmpwatch --atime 24 ./
[root@howtounix hack]# ll
total 0


간단하네.

       -u, --atime
              Make the decision about deleting a file based on the file’s atime (access time). This is
              the default.

              Note that the periodic updatedb file system scans keep the atime of directories  recent.

       -m, --mtime
              Make  the  decision  about deleting a file based on the file’s mtime (modification time)
              instead of the atime.

       -c, --ctime
              Make the decision about deleting a file based on the file’s ctime  (inode  change  time)
              instead of the atime; for directories, make the decision based on the mtime.

       -M, --dirmtime
              Make  the  decision about deleting a directory based on the directory’s mtime (modifica-
              tion time) instead of the atime; completely ignore atime for directories.

[출처] https://opentutorials.org/module/981/8083

'Works > CentOS & RockyLinux' 카테고리의 다른 글

CentOS 다운로드 미러 사이트  (0) 2017.01.03
CentOS7 hostname 설정  (0) 2016.10.31
du 명령어의 활용  (0) 2016.09.02
필요한 rpm 패키지를 다운받자  (0) 2016.08.03
xferlog 항목별 분석  (0) 2016.07.27

#!/bin/bash                                                   #!/bin/bash

string='www.sysadm.kr';                                     string='www.sysadm.kr';


if [[ $string == *"sysadm"* ]]                            if [[ $string =~ .*sysadm.* ]]
then                                                           then
  echo "It's there!";                       또는              echo "True"
else                                                            else
echo "There is no String!"                                   echo "False"
fi                                                               fi