Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
2answers
1k views

Bash pattern to match directories whose names begin with a dot (period), by being “explicit”, instead of using “shopt -s dotglob”?

When constructing a pattern that matches a file name such as /home/user/project/.git, how does one match the . character "explicitly" -- that is, without the use of shopt -s dotglob? The manual at ...
0
votes
1answer
45 views

Can you hide files and folders on MacOS the same way as Linux?

I'm trying to make a Python script that creates a hidden folder for a specific file I'm creating across any platform. I'm aware you can do this easily with Linux by placing "." as the beginning of a ...
3
votes
1answer
63 views

Which files in $HOME defines the user preferences in gnome?

I'm backup/syncing my dotfiles in my $HOME-Directory via git. I don't want to sync everything of course, so I ignore everything via .gitignore and re-add the important files. * !.bash* .*.swp ....
4
votes
1answer
444 views

Dot in front of file [duplicate]

If there is a file and the filename starts with a dot in front of it. Does that mean that you created the file and you are hiding stuff in it or can the files get created on their own without you ...
124
votes
10answers
125k views

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 ...
0
votes
0answers
25 views

How to always show hidden files/folders in Chrome OS Files app?

With the Chrome OS Files app, I know how to view hidden files and folders for a single open folder, but is there a way to make that persistent, either across all folders or for a particular folder?
0
votes
1answer
28 views

How do configure ZSH commands substition to not use backticks (`)?

I only want echo $(date) to return the date not the backticked version. echo $(date) # should return Wed Mar 6 09:50:41 EST 2019 echo `date` # should return `date`
0
votes
1answer
1k views

Can someone please explain this error I'm getting in my script

I'm trying to create a script which I can set as a cron job which adds all my dotfiles to a folder I've set up as a github repo then push them every evening. My script is the following. cp ~/.!(|.|...
2
votes
1answer
56 views

map ls -a to ls -A

I have tried to made an alias ls -a = ls -A, ending up with: bash: alias: `ls -a': invalid alias name I want ls -a without . and ... How can I get that?
12
votes
2answers
2k views

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 ...
20
votes
5answers
14k views

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 ...
23
votes
5answers
21k views

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 ...
0
votes
2answers
54 views

How to tar a directory including dotfiles, but omitting all reference to the directory itself

I want to back up home directories including the usual array of dotfiles, but I do not want the directory itself, or its permissions to be backed up or even mentioned. So, if I have a structure like ...
8
votes
4answers
338 views

Is the behaviour of .* to include . and .. defined in LSB or POSIX or some other specification?

Is the behavior of .* to include . and .. defined in LSB or POSIX or some other specification?
0
votes
1answer
76 views

Is there a totally empty Bash file I can use (or create) to extend .bashrc and .profile?

I know that by principle, one shouldn't change .bashrc and common changes like creating an alias should better be done in .profile instead. When I rent a new IaaS system with Bash as main shell, the ...
2
votes
6answers
2k views

UNIX: How to change all hidden files to visible in a multiple sub directories

I have hundreds of sub directories in a directory that all have hidden files in them that I need to remove the period at the beginning of them to make them visible. I found a command to go into each ...
0
votes
1answer
22 views

Can not edit file symlinked (Permission denied)

I started using dotfiles to sync everything I need to github. But I got some problem when symblink config files from dotfiles/ to ~/ Examples: $ rm ~/.config/termite/config $ ln -s ~/dotfiles/...
9
votes
8answers
12k views

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.
39
votes
8answers
7k views

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 ...
1
vote
1answer
25 views

Excluding certain files from moving but move hidden ones too

In my deployment script I have such as code to exclude certain files. shopt -s extglob mv !(deploy.sh|file1|file2) ~/$public It works almost well but ignores hidden files so they are not moved. How ...
2
votes
6answers
164 views

How do I match only dotfiles in bash? [duplicate]

rm -rf .* will only not end horribly because rm refuses to delete . and ... How do I exclude these special directories from a glob pattern? This is not solved by dotglob since I want to match only ...
1
vote
2answers
73 views

Remove files/folders that start with “.” [duplicate]

This command: rm -rf "$HOME/.quicklock/locks/"* does seem to remove files or folders in the locks directory, which start with "." how can I remove those files too? Any other filenames that would ...
7
votes
1answer
262 views

How are files/dirs hidden from ls -a while still being accessible otherwise in a POSIX compliant system?

For example, in ZFS under FreeBSD and ZoL, there is a magic .zfs dir inside of each zpool mountpoint and you can use zfs set snapdir=visible to make that .zfs dir visible. What makes me curious is: ...
0
votes
1answer
52 views

How to save settings for Synaptic (Graphical package manager)?

I have dotfiles where I store the settings from all the programs that I use. I mean files with the extension .conf, .cfg, .rc and etc. But I cannot find a place where the Synaptic keeps its settings. ...
2
votes
2answers
175 views

ssh directory disappears after `mv ssh .ssh`

I was in user home directory , and wanted to rename the ssh folder into .ssh folder. I tried this. rachit@DESKTOP-ENS2652:~/ssh$ ls some-machine some-machine.pub rachit@DESKTOP-ENS2652:~/ssh$ cd .. ...
-2
votes
1answer
88 views

cp -r <Folder Name> .<Folder Name>

I run the command cp -r <Folder Name> .<Folder Name>. It have done something, but I cannot find it. Example: cp -r Agent .Agent.old # (There is a dot symbol on the 2nd folder name)
12
votes
5answers
8k views

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 ...
5
votes
4answers
7k views

How to delete all files in a current directory starting with a dot?

I use Ubuntu 14.04 and in a terminal I became root with sudo su and I wanted to delete root's trash manually. It deleted everything except for a few files that start with a dot. Like .htaccess etc. So ...
3
votes
4answers
21k views

How to show only hidden directories, and then find hidden files separately

I'm trying to list all the hidden files in a directory, but not other directories, and I am trying to do this using only ls and grep. ls -a | egrep "^\." This is what I have so far, but the problem ...
1
vote
1answer
271 views

How to disable oh-my-zsh features only in PyCharm terminal

When using the shell in PyCharm, I have noticed that when I type quickly, the auto-complete feature will cause characters to be dropped. Is there a convenient way to start /bin/zsh and cause it to ...
35
votes
3answers
6k views

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 ...
2
votes
1answer
4k views

Remove everything within directory using for loop

I am trying to remove large amount of mails (mostly mail delivery failed) from my server using rm -rf /home/*/mail/new/* And I am getting -bash: /usr/bin/rm: Argument list too long I tried using ...
1
vote
1answer
1k views

Where to put bash configuration for newly created users? [duplicate]

I have an assignment and I'm confused which bash configuration file to edit. I'm supposed to edit a bash configuration file and change the PS1 prompt and add an environment variable that searches ~/...
1
vote
2answers
109 views

Setting Vim to use shell syntax for dotfiles?

I am creating multiple files (.school_aliases and .git_aliases) to put my aliases in for organization. However, Vim doesn't highlight syntax for these files automatically like for .bashrc or ....
31
votes
3answers
10k views

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'...
1
vote
2answers
264 views

Backup only hidden (dot) files with duplicity

I would like to backup config files (hidden, starting with a dot) with duplicity. Only files, no directories. The following command duplicity --include '/home/foo/.*' --exclude '/home/foo/**' /home/...
0
votes
1answer
389 views

Grouping hidden files and directories with ls

How can ls be flagged to sort .-prefixed hidden directories and files in groups so that its output is sorted as visible directories, hidden directories, visible files, then hidden files? I currently ...
0
votes
0answers
92 views

Windows 10 ISO content looks odd (“.” directory)

I've downloaded Windows 10 Disc Image from microsoft.com recently. I mounted it using Archive Mounter in Ubuntu. And I saw just a hidden folder "." and an empty "README.TXT" file in the root. ls -aR ...
3
votes
2answers
1k views

Is there a way to have ls show hidden files for only certain directories?

I have a directory where regardless of user or options selected, I would like it to always show hidden files. I know the -a option will show hidden files. I just want to automate the decision on ...
1
vote
1answer
85 views

Migrate from Linux Mint to OS X [closed]

So my trusty Linux box died after 10 years of faithful service. The memorial will be Friday afternoon. Anyway, I am moving to a Mac (lesser of two evils - a Win 10 machine was the other option), and ...
0
votes
2answers
408 views

Symlinking all dot-files and -directories

Say I have a folder ~/dot containing some files and directories, such as zshrc, Xresources, and emacs.d. How do I create symlinks to all of those in ~, but such that the symlinks begin with a dot (....
15
votes
3answers
14k views

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 ...
0
votes
1answer
224 views

Why does /etc/profile check PS1 rather than the -i flag in $-

I know of two ways to test whether a shell is interactive, [[ $- == *i* ]] && echo "-i option flag indicates interactive" [ -n "$PS1" ] && echo "prompt is set" I've read that ...
14
votes
1answer
64k views

proper way to iterate through contents in a directory [duplicate]

I need to iterate through every file inside a directory. One common way I saw was using the for loop that begins with for file in *; do. However, I realized that it does not include hidden files (...
2
votes
7answers
3k views

grep ignores files starting with dot [duplicate]

Let me give an example: $ echo Hello > file1 $ echo Hello > file2 $ echo Hello > .file3 $ grep Hello * 2>/dev/null file1:Hello file2:Hello Here you can see the grep ignored .file3 which ...
12
votes
3answers
5k views

Why are some files and folders hidden?

I can understand the rationale of hiding files and folders in the /home/user directory to prevent users from messing around with things. However, I do not see how the same rationale can be applied to ...
1
vote
2answers
324 views

Good way to prevent student from messing program settings in /home/user

I am a teacher and I use Linux which is great! But students are curious about this "new" operating system they do not know and in GUI they tweak program settings which affects hidden files inside /...
4
votes
2answers
6k views

rm wildcard not working

I want to delete all .swp files recursively. However: rm -r *.swp Gives: rm: cannot remove ‘*.swp’: No such file or directory Just to be sure, ls -all gives: total 628 drwxr--r--. 8 przecze ...
4
votes
1answer
209 views

Keeping dotfiles in sync for different folders

I am using Dropbox for storing my dotfiles from which I create soft links to my home directory. For configuration files which I do edit by myself it works very good, however applications like firefox ...
1
vote
0answers
21 views

Methods to saving system configuration files [duplicate]

Normally user-specific config files would be dotfiles in the home-directory. If the user wanted a little more, they could put it in a dotfiles folder and symlink the files or use gnu stow to handle ...