Questions tagged [dot-files]

A dotfile is a file or directory whose name begins with a dot. These files are typically found in user home directories, contain configuration information and hidden from view on Unix systems.

A dotfile is a form of configuration file found on Unix and Unix-like systems.

Such files and directories have names that begin with a dot (hence the name). These files are typically found in user home directories and not displayed in default file listings.

131 questions
219
votes
12 answers

How do you move all files (including hidden) from one directory to another?

How do I move all files in a directory (including the hidden ones) to another directory? For example, if I have a folder "Foo" with the files ".hidden" and "notHidden" inside, how do I move both files to a directory named "Bar"? The following does…
Cory Klein
  • 18,391
  • 26
  • 81
  • 93
50
votes
3 answers

How can I stop seeing hidden files in the Midnight Commander?

The Midnight Commander is a very helpful tool when we're using only the text mode. But sometimes it bothers me that I have to see all the hidden files inside a folder (files that begin with "."). I've tried to find how to do it changing some…
Rafael Muynarsk
  • 2,606
  • 3
  • 18
  • 25
46
votes
3 answers

Why do some applications use ~/.config/appname for their config data while others use ~/.appname?

I've noticed that some applications put their configuration files to ~/.config/appname while others use ~/.appname (the classic way, AFAIK) for this. What's the sense in this distinction and what could be better to consider for an application of…
Ivan
  • 17,368
  • 35
  • 93
  • 118
43
votes
9 answers

Are there pitfalls to putting $HOME in git instead of symlinking dotfiles?

I have for many years had my entire $HOME directory checked into subversion. This has included all my dotfiles and application profiles, many scripts, tools and hacks, my preferred basic home directory structure, not a few oddball projects and a…
Caleb
  • 69,278
  • 18
  • 196
  • 226
37
votes
5 answers

How to match * with hidden files inside a directory

How to match the hidden files inside the given directories for example If I give the below command it's not giving the result of the hidden files, du -b maybehere*/* how to achieve this simple using a single command instead of using du -b…
vidhan
  • 645
  • 2
  • 6
  • 10
35
votes
5 answers

What's so special about directories whose names begin with a dot?

I was wondering what the difference between these two were: ~/somedirectory/file.txt and ~/.somedirectory/file.txt It's really difficult to ask this on Google since I didn't know how to explain the . when I didn't even know what to call it. But…
Dark Templar
  • 585
  • 1
  • 6
  • 7
32
votes
4 answers

How do I apply the changes to the .zshrc file after editing it?

I just edited the .zshrc file to configure Z shell on FreeBSD, for example to update the PATH system variable. path+=/usr/local/openjdk12/bin How do I make the changes take effect? Must I log out and log in again? Is there a way to immediately run…
Basil Bourque
  • 1,475
  • 1
  • 16
  • 29
31
votes
2 answers

cp behaves weirdly when . (dot) or .. (dot dot) are the source directory

This answer reveals that one can copy all files - including hidden ones - from directory src into directory dest like so: mkdir dest cp -r src/. dest There is no explanation in the answer or its comments as to why this actually works, and nobody…
iFreilicht
  • 898
  • 10
  • 14
27
votes
3 answers

How to rename file to .. (dot dot)?

Apparently you can rename file to .... If I were insane, how would I rename file to .. or .? Is such a filename even allowed? Backslash doesn't seem to disable dot's special meaning: $ mv test \. mv: `test' and `./test' are the same file
gronostaj
  • 678
  • 1
  • 8
  • 18
24
votes
10 answers

display only files starting with . (hidden)

I tried to display only hidden files but don't know how to do it. That is working (but matching also dots in other places) ls -la | grep '\.' Was trying adding ^ but didn't find the solution.
user3014282
  • 415
  • 2
  • 4
  • 6
22
votes
5 answers

cp hidden files with glob patterns

Situation : $ mkdir foo && touch foo/.test $ cp foo/* . zsh: no matches found: foo/* (or bash : cp: cannot stat ‘foo/*’: No such file or directory) I have a directory full of hidden folders and files. What is happening and what is the solution?
Gradient
  • 3,579
  • 10
  • 31
  • 37
22
votes
7 answers

`command .*` acts on the parent directory

Someone of our team wanted to recursively change the user permissions on all hidden directories in a users home directory. To do so he executed the following command: cd /home/username chown -R username:groupname .* We were pretty surprised when we…
g000ze
  • 343
  • 1
  • 7
21
votes
2 answers

How to keep dotfiles system-agnostic?

Due to work I have recently started using OS X and have set it up using homebrew in order to get a similar experience as with Linux. However, there are quite a few differences in their settings. Some only need to be in place on one system. As my…
k0pernikus
  • 14,853
  • 21
  • 58
  • 79
19
votes
3 answers

Clean $HOME directory

During a few years, in my $HOME directory a lot of hidden files and directories appeared. I would like to continually delete the unneeded ones. How can I find out which applications created those hidden files and directories. How can I be sure that…
xralf
  • 16,149
  • 29
  • 101
  • 149
17
votes
3 answers

Why are filenames that start with a dot hidden? Can I hide files without using a dot as their first character?

Initially I thought it was a coincidence, but now I see there's even a tag for it: all hidden file names start with a dot. Is this a convention? Why was it chosen? Can it be changed? Or in other words (as a related question @evilsoup suggested that…
JMCF125
  • 1,022
  • 3
  • 13
  • 26
1
2 3
8 9