티스토리 뷰

레드헷 리눅스 Red Hat Linux version

파일 또는 디렉토리 관리 필수 명령어

Managing file and directory by using essetial command

 

 

 

1. find => 파일, 디렉토리 검색 명령어

             Command search file or directory

형식Format )

[root@jasonlee~]# find 검색디렉토리 -겸색옵션 검색조건

[root@jasonlee~]# find searchDir -serOpt serCondition

 

ex) [root@jasonlee~]# find /etc -type f -name '*.conf' -print

                               (-print 생략 가능 can be leave out)

=> /etc 디렉토리안에 -type f 파일형식에 -name '*.conf' conf라는 이름 파일 검색

   Inside /etc directory, search by format in file (-type f) and by the name end with '.conf' (-name '*.conf) 

 

 

 

 

2. where is => 명령의 유뮤 존재 확인 Check if command exists or not and show location

 

형식Format ) [root@jasonlee~]# whereis 명령Command

 

 

 

 

3. grep => 파일에서 원하는 단어 검색

             Search by words that you are looking for in files 

 

형식Format ) [root@jasonlee~]# greb 검색단어WordtoSearch

             

ex) [root@jasonlee~]# ls -s /etc | greb grub 

 

 

 

4. compress => 압축 명령, 원본 파일을 압축파일로 변환

                    Command to compress original file

 

형식Format ) [root@jasonlee~]# compress 파일명File

                                             => 파일명.zip 로 변환

                                                 convert to file.zip

 

   [root@jasonlee~]# uncompress 파일명File.Z

 

 

형식Format ) [root@jasonlee~]# gzip 파일명File

=> 파일명.gz 로 변환

convert to file.gz

   [root@jasonlee~]# gunzip 파일명File.gz

 

 

형식Format ) [root@jasonlee~]# bzip2 파일명File

=> 파일명.bz2 로 변환

convert to file.bz2

   [root@jasonlee~]# bunzip2 파일명File.bz2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
TAG
more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함