Filename with dot in front
If there is a file and the filename starts with a dot, does that mean you created the file and you are hiding stuff in it, or can the files get created on their own without you creating the filename?
filenames
New contributor
add a comment |
If there is a file and the filename starts with a dot, does that mean you created the file and you are hiding stuff in it, or can the files get created on their own without you creating the filename?
filenames
New contributor
3
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations. If you usebash
, one important file among those is.bashrc
.
– Weijun Zhou
19 hours ago
WeijunZhou, "It means the file is hidden. Period." I'm afraid that's just wrong. The default position ofls
, most GUI file managers, and shell globs is to ignore such files, but that is all. Nothing else differentiates or even cares.
– roaima
5 hours ago
1
Possible duplicate of What does the dot mean
– Olorin
1 hour ago
add a comment |
If there is a file and the filename starts with a dot, does that mean you created the file and you are hiding stuff in it, or can the files get created on their own without you creating the filename?
filenames
New contributor
If there is a file and the filename starts with a dot, does that mean you created the file and you are hiding stuff in it, or can the files get created on their own without you creating the filename?
filenames
filenames
New contributor
New contributor
edited 25 mins ago
RonJohn
510315
510315
New contributor
asked 20 hours ago
Regina SaucedoRegina Saucedo
121
121
New contributor
New contributor
3
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations. If you usebash
, one important file among those is.bashrc
.
– Weijun Zhou
19 hours ago
WeijunZhou, "It means the file is hidden. Period." I'm afraid that's just wrong. The default position ofls
, most GUI file managers, and shell globs is to ignore such files, but that is all. Nothing else differentiates or even cares.
– roaima
5 hours ago
1
Possible duplicate of What does the dot mean
– Olorin
1 hour ago
add a comment |
3
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations. If you usebash
, one important file among those is.bashrc
.
– Weijun Zhou
19 hours ago
WeijunZhou, "It means the file is hidden. Period." I'm afraid that's just wrong. The default position ofls
, most GUI file managers, and shell globs is to ignore such files, but that is all. Nothing else differentiates or even cares.
– roaima
5 hours ago
1
Possible duplicate of What does the dot mean
– Olorin
1 hour ago
3
3
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations. If you use
bash
, one important file among those is .bashrc
.– Weijun Zhou
19 hours ago
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations. If you use
bash
, one important file among those is .bashrc
.– Weijun Zhou
19 hours ago
WeijunZhou, "It means the file is hidden. Period." I'm afraid that's just wrong. The default position of
ls
, most GUI file managers, and shell globs is to ignore such files, but that is all. Nothing else differentiates or even cares.– roaima
5 hours ago
WeijunZhou, "It means the file is hidden. Period." I'm afraid that's just wrong. The default position of
ls
, most GUI file managers, and shell globs is to ignore such files, but that is all. Nothing else differentiates or even cares.– roaima
5 hours ago
1
1
Possible duplicate of What does the dot mean
– Olorin
1 hour ago
Possible duplicate of What does the dot mean
– Olorin
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
The only thing "special" about a file with a leading dot in its name, such as .myfile
, is that it will not show up in the output of ls
by default. It will also not be matched by a file name globbing pattern that does not explicitly match filenames starting with a dot.
$ touch .myfile # this creates an empty hidden file
$ ls # this will output nothing
$ echo * # this will echo a *
*
These files are usually called "hidden", although they are only hidden from ls
and filename globbing patterns, and not hidden in the sense of "being secret" or being totally undetectable, or being unreadable by others (it depends on the file's permission and the permission of its parent folder(s)).
Anyone can create hidden files, it's just a matter of putting a dot at the start of the name. The fact that a file is hidden says nothing about how it was created (explicitly by a user, or by running some program).
Configuration files in user's home directories (and elsewhere) are often hidden in this way so that they don't clutter the output of ls
.
To view all files in a directory, including hidden files, use the -a
or -A
option with ls
(using -A
will not show the .
and ..
names that are present in any Unix directory).
$ ls -a
. .. .myfile
$ ls -A
.myfile
In the bash
shell, *
and other shell globbing patterns will not match hidden names. To get them to do that, enable the dotglob
shell option with shopt -s dotglob
.
$ echo *
*
$ shopt -s dotglob
$ echo * # the * now matches a filename, so it is replaced by it
.myfile
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Regina Saucedo is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506233%2ffilename-with-dot-in-front%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The only thing "special" about a file with a leading dot in its name, such as .myfile
, is that it will not show up in the output of ls
by default. It will also not be matched by a file name globbing pattern that does not explicitly match filenames starting with a dot.
$ touch .myfile # this creates an empty hidden file
$ ls # this will output nothing
$ echo * # this will echo a *
*
These files are usually called "hidden", although they are only hidden from ls
and filename globbing patterns, and not hidden in the sense of "being secret" or being totally undetectable, or being unreadable by others (it depends on the file's permission and the permission of its parent folder(s)).
Anyone can create hidden files, it's just a matter of putting a dot at the start of the name. The fact that a file is hidden says nothing about how it was created (explicitly by a user, or by running some program).
Configuration files in user's home directories (and elsewhere) are often hidden in this way so that they don't clutter the output of ls
.
To view all files in a directory, including hidden files, use the -a
or -A
option with ls
(using -A
will not show the .
and ..
names that are present in any Unix directory).
$ ls -a
. .. .myfile
$ ls -A
.myfile
In the bash
shell, *
and other shell globbing patterns will not match hidden names. To get them to do that, enable the dotglob
shell option with shopt -s dotglob
.
$ echo *
*
$ shopt -s dotglob
$ echo * # the * now matches a filename, so it is replaced by it
.myfile
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
add a comment |
The only thing "special" about a file with a leading dot in its name, such as .myfile
, is that it will not show up in the output of ls
by default. It will also not be matched by a file name globbing pattern that does not explicitly match filenames starting with a dot.
$ touch .myfile # this creates an empty hidden file
$ ls # this will output nothing
$ echo * # this will echo a *
*
These files are usually called "hidden", although they are only hidden from ls
and filename globbing patterns, and not hidden in the sense of "being secret" or being totally undetectable, or being unreadable by others (it depends on the file's permission and the permission of its parent folder(s)).
Anyone can create hidden files, it's just a matter of putting a dot at the start of the name. The fact that a file is hidden says nothing about how it was created (explicitly by a user, or by running some program).
Configuration files in user's home directories (and elsewhere) are often hidden in this way so that they don't clutter the output of ls
.
To view all files in a directory, including hidden files, use the -a
or -A
option with ls
(using -A
will not show the .
and ..
names that are present in any Unix directory).
$ ls -a
. .. .myfile
$ ls -A
.myfile
In the bash
shell, *
and other shell globbing patterns will not match hidden names. To get them to do that, enable the dotglob
shell option with shopt -s dotglob
.
$ echo *
*
$ shopt -s dotglob
$ echo * # the * now matches a filename, so it is replaced by it
.myfile
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
add a comment |
The only thing "special" about a file with a leading dot in its name, such as .myfile
, is that it will not show up in the output of ls
by default. It will also not be matched by a file name globbing pattern that does not explicitly match filenames starting with a dot.
$ touch .myfile # this creates an empty hidden file
$ ls # this will output nothing
$ echo * # this will echo a *
*
These files are usually called "hidden", although they are only hidden from ls
and filename globbing patterns, and not hidden in the sense of "being secret" or being totally undetectable, or being unreadable by others (it depends on the file's permission and the permission of its parent folder(s)).
Anyone can create hidden files, it's just a matter of putting a dot at the start of the name. The fact that a file is hidden says nothing about how it was created (explicitly by a user, or by running some program).
Configuration files in user's home directories (and elsewhere) are often hidden in this way so that they don't clutter the output of ls
.
To view all files in a directory, including hidden files, use the -a
or -A
option with ls
(using -A
will not show the .
and ..
names that are present in any Unix directory).
$ ls -a
. .. .myfile
$ ls -A
.myfile
In the bash
shell, *
and other shell globbing patterns will not match hidden names. To get them to do that, enable the dotglob
shell option with shopt -s dotglob
.
$ echo *
*
$ shopt -s dotglob
$ echo * # the * now matches a filename, so it is replaced by it
.myfile
The only thing "special" about a file with a leading dot in its name, such as .myfile
, is that it will not show up in the output of ls
by default. It will also not be matched by a file name globbing pattern that does not explicitly match filenames starting with a dot.
$ touch .myfile # this creates an empty hidden file
$ ls # this will output nothing
$ echo * # this will echo a *
*
These files are usually called "hidden", although they are only hidden from ls
and filename globbing patterns, and not hidden in the sense of "being secret" or being totally undetectable, or being unreadable by others (it depends on the file's permission and the permission of its parent folder(s)).
Anyone can create hidden files, it's just a matter of putting a dot at the start of the name. The fact that a file is hidden says nothing about how it was created (explicitly by a user, or by running some program).
Configuration files in user's home directories (and elsewhere) are often hidden in this way so that they don't clutter the output of ls
.
To view all files in a directory, including hidden files, use the -a
or -A
option with ls
(using -A
will not show the .
and ..
names that are present in any Unix directory).
$ ls -a
. .. .myfile
$ ls -A
.myfile
In the bash
shell, *
and other shell globbing patterns will not match hidden names. To get them to do that, enable the dotglob
shell option with shopt -s dotglob
.
$ echo *
*
$ shopt -s dotglob
$ echo * # the * now matches a filename, so it is replaced by it
.myfile
edited 6 hours ago
answered 19 hours ago
KusalanandaKusalananda
135k17255422
135k17255422
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
add a comment |
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
Great expansion on my comment. +1.
– Weijun Zhou
19 hours ago
add a comment |
Regina Saucedo is a new contributor. Be nice, and check out our Code of Conduct.
Regina Saucedo is a new contributor. Be nice, and check out our Code of Conduct.
Regina Saucedo is a new contributor. Be nice, and check out our Code of Conduct.
Regina Saucedo is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506233%2ffilename-with-dot-in-front%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
It means the file is hidden. Period. You may create such a file, or it can be generated by the system. There are many hidden files in your home folder storing your configurations. If you use
bash
, one important file among those is.bashrc
.– Weijun Zhou
19 hours ago
WeijunZhou, "It means the file is hidden. Period." I'm afraid that's just wrong. The default position of
ls
, most GUI file managers, and shell globs is to ignore such files, but that is all. Nothing else differentiates or even cares.– roaima
5 hours ago
1
Possible duplicate of What does the dot mean
– Olorin
1 hour ago