Files and directories whose names begin with .
, are βhiddenβ only in the sense that (a) ls
ignores them by default and (b) wildcard expansion excludes them. In both cases, you can see point files if you refer to them explicitly. *
Expands to all non-point files; .*
extends to all point files.
(Other tools and commands may also treat them as hidden ones, for example, graphic file administrators such as Nautilus usually donβt display dot files by default, but can often be shown.)
ls -a
cancels special handling of files whose names begin with .
. ls -a
lists hidden files and folders, but excludes them .
(this directory) and ..
(parent directory); some ls
versions may not support -A
.
The du
command, as far as I know, does not treat point files as hidden. du -h
should show the complete directory tree, starting from the current directory. (Try in the small directory tree to make sure that you behave this way.)
EDIT:
I have confirmed that at least the GNU coreutils du
version does not process files or directories whose names begin with .
on purpose; nothing is hidden.
For example, this script:
produces this conclusion on my system (specific numbers depend on the nature of the file system and are not relevant to the current discussion):
4.0K ./.dot/.dot 4.0K ./.dot/nodot 12K ./.dot 4.0K ./nodot/.dot 4.0K ./nodot/nodot 12K ./nodot 32K .
Does this fit your requirements? If not, can you explain more clearly what exactly you are looking for? You want to list all directories, whether their names begin with .
or not? Do you want to list only "hidden" directories? What result would you like to create for the directory structure created by the above script?
source share