In Unix systems, files and directories that begin with .
are "hidden". Microsoft Office creates temporary files that begin with ~$
, such as ~$Unnamed_document.docx
. I would like to make bash
– and especially ls
– treat these files as hidden files, too. Is that possible? If so, how?
Asked
Active
Viewed 34 times
0

reynoldsnlp
- 1,072
- 1
- 18
- 45
-
1This might help: `man ls | grep hide` – Cyrus Feb 02 '20 at 06:16
1 Answers
2
You could define this alias:
alias ls=ls --hide='~$*'
Files starting with ~$
will be hidden. Use ls -a
to show the hidden files.

builder-7000
- 7,131
- 3
- 19
- 43