登陸提示符變成-bash-4.1$
原因是刪除了家目錄下的.bash
[root@localhost ~]# rm -rf /home/test/.bashbr/>[root@localhost ~]# ll -a /home/test/
總用量 8br/>drwx------. 5 test test 72 12月 4 23:09 .
drwxr-xr-x. 4 root root 27 12月 2 13:55 ..
-rw-rw-r--. 1 test test 73 12月 4 23:05 -a
drwxrwxr-x. 3 test test 17 12月 2 13:56 .cache
drwxrwxr-x. 3 test test 17 12月 2 13:56 .config
drwxr-xr-x. 4 test test 37 11月 29 17:47 .mozilla
-rw-------. 1 test test 676 12月 3 20:18 .viminfo
[root@localhost ~]# su - test
上一次登錄:日 12月 4 23:05:47 CST 2016pts/0 上br/>-bash-4.2$ exit
登出
[root@localhost ~]# cp /etc/skel/.bash* /home/test/
[root@localhost ~]# ll -a /home/test/br/>總用量 28
drwx------. 5 test test 4096 12月 4 23:10 .
drwxr-xr-x. 4 root root 27 12月 2 13:55 ..
-rw-rw-r--. 1 test test 73 12月 4 23:05 -a
-rw-------. 1 test test 16 12月 4 23:13 .bash_history
-rw-r--r--. 1 root root 18 12月 4 23:10 .bash_logout
-rw-r--r--. 1 root root 193 12月 4 23:10 .bash_profile
-rw-r--r--. 1 root root 231 12月 4 23:10 .bashrc
drwxrwxr-x. 3 test test 17 12月 2 13:56 .cache
drwxrwxr-x. 3 test test 17 12月 2 13:56 .config
drwxr-xr-x. 4 test test 37 11月 29 17:47 .mozilla
-rw-------. 1 test test 676 12月 3 20:18 .viminfo
[root@localhost ~]# chown test:test /home/test/ -R
[root@localhost ~]# ll -a /home/test/br/>總用量 28
drwx------. 5 test test 4096 12月 4 23:10 .
drwxr-xr-x. 4 root root 27 12月 2 13:55 ..
-rw-rw-r--. 1 test test 73 12月 4 23:05 -a
-rw-------. 1 test test 16 12月 4 23:13 .bash_history
-rw-r--r--. 1 test test 18 12月 4 23:10 .bash_logout
-rw-r--r--. 1 test test 193 12月 4 23:10 .bash_profile
-rw-r--r--. 1 test test 231 12月 4 23:10 .bashrc
drwxrwxr-x. 3 test test 17 12月 2 13:56 .cache
drwxrwxr-x. 3 test test 17 12月 2 13:56 .config
drwxr-xr-x. 4 test test 37 11月 29 17:47 .mozilla
-rw-------. 1 test test 676 12月 3 20:18 .viminfo
[root@localhost ~]#
[root@localhost ~]# su - test
上一次登錄:日 12月 4 23:09:34 CST 2016pts/0 上
[test@localhost ~]$
[root@localhost ~]# rm -rf /home/test/.bashbr/>[root@localhost ~]# ll -a /home/test/
總用量 8br/>drwx------. 5 test test 72 12月 4 23:09 .
drwxr-xr-x. 4 root root 27 12月 2 13:55 ..
-rw-rw-r--. 1 test test 73 12月 4 23:05 -a
drwxrwxr-x. 3 test test 17 12月 2 13:56 .cache
drwxrwxr-x. 3 test test 17 12月 2 13:56 .config
drwxr-xr-x. 4 test test 37 11月 29 17:47 .mozilla
-rw-------. 1 test test 676 12月 3 20:18 .viminfo
[root@localhost ~]# su - test
上一次登錄:日 12月 4 23:05:47 CST 2016pts/0 上br/>-bash-4.2$ exit
登出
[root@localhost ~]# cp /etc/skel/.bash* /home/test/
[root@localhost ~]# ll -a /home/test/br/>總用量 28
drwx------. 5 test test 4096 12月 4 23:10 .
drwxr-xr-x. 4 root root 27 12月 2 13:55 ..
-rw-rw-r--. 1 test test 73 12月 4 23:05 -a
-rw-------. 1 test test 16 12月 4 23:13 .bash_history
-rw-r--r--. 1 root root 18 12月 4 23:10 .bash_logout
-rw-r--r--. 1 root root 193 12月 4 23:10 .bash_profile
-rw-r--r--. 1 root root 231 12月 4 23:10 .bashrc
drwxrwxr-x. 3 test test 17 12月 2 13:56 .cache
drwxrwxr-x. 3 test test 17 12月 2 13:56 .config
drwxr-xr-x. 4 test test 37 11月 29 17:47 .mozilla
-rw-------. 1 test test 676 12月 3 20:18 .viminfo
[root@localhost ~]# chown test:test /home/test/ -R
[root@localhost ~]# ll -a /home/test/br/>總用量 28
drwx------. 5 test test 4096 12月 4 23:10 .
drwxr-xr-x. 4 root root 27 12月 2 13:55 ..
-rw-rw-r--. 1 test test 73 12月 4 23:05 -a
-rw-------. 1 test test 16 12月 4 23:13 .bash_history
-rw-r--r--. 1 test test 18 12月 4 23:10 .bash_logout
-rw-r--r--. 1 test test 193 12月 4 23:10 .bash_profile
-rw-r--r--. 1 test test 231 12月 4 23:10 .bashrc
drwxrwxr-x. 3 test test 17 12月 2 13:56 .cache
drwxrwxr-x. 3 test test 17 12月 2 13:56 .config
drwxr-xr-x. 4 test test 37 11月 29 17:47 .mozilla
-rw-------. 1 test test 676 12月 3 20:18 .viminfo
[root@localhost ~]#
[root@localhost ~]# su - test
上一次登錄:日 12月 4 23:09:34 CST 2016pts/0 上
[test@localhost ~]$
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.