리눅스 중요 명령어 복구

(리눅스 주요 명령어 파일 복구에서 넘어옴)

1 개요[ | ]

리눅스 중요 명령어 파일 복구
리눅스 명령어 파일 복원

2 실습[ | ]

※ 주의!!! 진짜 망가질 수 있음

망가뜨리기
[root@zetawiki ~]# ls
anaconda-ks.cfg
[root@zetawiki ~]# which ls
alias ls='ls --color=auto'
	/usr/bin/ls
[root@zetawiki ~]# mv /usr/bin/ls /usr/bin/ls2
[root@zetawiki ~]# ls
-bash: /usr/bin/ls: No such file or directory
패키지 찾기
[root@zetawiki ~]# rpm -qf /usr/bin/ls
coreutils-8.22-11.el7.x86_64
재설치하기
[root@zetawiki ~]# yum reinstall coreutils
... (생략)
===========================================================================================
 Package               Arch               Version                   Repository        Size
===========================================================================================
Reinstalling:
 coreutils             x86_64             8.22-11.el7               base             3.2 M

Transaction Summary
===========================================================================================
Reinstall  1 Package

Total download size: 3.2 M
Installed size: 14 M
Is this ok [y/d/N]: y
... (생략)
Installed:
  coreutils.x86_64 0:8.22-11.el7                                                           

Complete!
[root@zetawiki ~]# ls
anaconda-ks.cfg

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}