0

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?

reynoldsnlp
  • 1,072
  • 1
  • 18
  • 45

1 Answers1

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