How to hide files in Linux

Source: Internet
Author: User

/*************************************** ******************************
* 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.