I know how to show and hide hidden files in the Terminal – but is there a way to hide certain files like .DS_STORE when showing hidden files? Make certain files super-hidden, so to speak?
R – OSX – always hide certain files
macosterminal
Related Question
- Macos – How to clear previous output in Terminal in Mac OS X
- Unix – Concatenate multiple files but include filename as section headers
- Bash – How to clear/delete the current line in terminal
- Node.js – Upgrade Node.js to the latest version on Mac OS
- Java – Where is Java Installed on Mac OS X
- Java – How to install Java 8 on Mac
- Git branch command behaves like ‘less’
Best Solution
Use
chflags
with the hidden optionie:
chflags hidden fileToHide
to hide the file from the Findeand
chflags nohidden fileToHide
to show the filePlease do keep in mind the warning in man page:
What that means is that while you won't see in the Finder or Open/Save dialog boxes, the Terminal will still see it and possibly other programs that don't respect BSD flags.