1.7 Dot Files


1.7 Dot Files

Change to your home directory and take a look around with ls , and then run ls -a . At first, you will not see the configuration files, which are also called dot files . Dot files are nothing more than files and directories whose names begin with a dot (.). Common dot files are .bashrc and .login . There are some dot directories, too, such as .mozilla .

There is nothing special about dot files or directories. Some programs just don't list them by default, so that you don't see a complete mess when listing the contents of your home directory. For example, without the -a option, ls doesn't list dot files. In addition, shell wildcards don't match dot files unless you explicitly use a pattern such as .* .

Note  

You can still run into problems with wildcards because .* matches . and .. (the current and parent directories). Depending on what you're doing, you may wish to use a pattern such as . [ ^. ] * or .??* to get all dot files except the current and parent directories. This isn't a perfect solution, but it usually works.




How Linux Works
How Linux Works: What Every Superuser Should Know
ISBN: 1593270356
EAN: 2147483647
Year: 2004
Pages: 189
Authors: Brian Ward

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net