본문 바로가기

CentOS/Study

[이론]디렉터리와 파일 사용하기 연습문제 - 4

반응형

22. /etc/passwd 파일에서 문자열 'bash'가 들어 있는 행을 출력하시오.

 

[root@linux1 ~]# grep bash /etc/passwd
root:x:0:0:root:/root:/bin/bash
student:x:1000:1000:student:/home/student:/bin/bash
user1:x:1001:1001::/home/user1:/bin/bash
user2:x:1002:1002::/home/user2:/bin/bash
[root@linux1 ~]# 

 

23. /etc 다렉토리 아래에 있는 passwd 파일의 경로를 찾으시오.

 

[root@linux1 ~]# find /etc -name passwd
/etc/pam.d/passwd
/etc/passwd
[root@linux1 ~]# 

 

24. cp의 실행 파일이 있는 위치를 검색하시오.

 

[root@linux1 ~]# which cp
alias cp='cp -i'
	/usr/bin/cp
[root@linux1 ~]#

 

페도라 리눅스
국내도서
저자 : 이종원
출판 : 한빛아카데미 2017.11.10
상세보기
반응형