How to hide .pyc files when you enter `ls` in bash How to hide .pyc files when you enter `ls` in bash python python

How to hide .pyc files when you enter `ls` in bash


This way lies the dark side, but you could force ls to never show them by adding something like

alias ls='ls --hide="*.pyc"'

to your .bashrc. ls will reveal the hidden files if you use -a or -A.

However, I would recommend just ignoring them in your head, or running this version of ls when you really don't want to see them.