/*************************************** ******************************
* Author: Samson
* Date: 08/23/2012
* Test Platform:
* GNU Linux version 2.6.29.4
* GNU bash, version 4.0.16 (1)-release (i386-redhat-linux-gnu)
**************************************** ****************************/
Recently, when the company used the SuSE system, the LS command was executed on the terminal, and the hidden files (file names starting with.) were also displayed. I am wondering, shouldn't it be displayed. At first, I thought that the configuration file of the configuration file property was modified. The result showed that the configuration file was originally an alias. To remove this feature, run the alias command first:
[Samson @ UFO/] $ alias
Alias L. = 'LS-D. * -- color = auto'
Alias LL = 'LS-l -- color = auto'
Alias ls = 'ls $ ls_options'
Alias Vi = 'vim'
Alias which = 'Alias |/usr/bin/which -- tty-only -- read-alias -- show-dot -- show-tilde'
Generally, the LS alias contains the ls_options parameter. Use echo $ ls_options in the command line,
[Samson @ UFO ~] $ Echo $ ls_options
-A -- color = auto
You can remove the-A option by modifying the alias. The-A option is to display the division. (indicating the current directory) and .. (parent directory) All files or folders in the current directory.
The modification method can be as follows:
Alias ls = 'ls -- color = auto'
If you execute the LS command in the command line, you will not be able to see the hidden file. However, this modification only applies to the current TTY. If the new terminal does not take effect, it is only a short-term change. If you want the change to take effect in the entire system, you need to perform the following operations:
In the/etc directory grep ls_options, this parameter is defined in some files. VI open these files, delete and save-a in these rows, and then restart the terminal.