In a Django project, I've run a python manage.py compilescss
command which has generated a bunch of untracked CSS files:
I would like to delete all untracked files ending with *css
with a single command. From Git: list only "untracked" files (also, custom commands), I've so far found that the command to list all untracked files is
git ls-files --others --exclude-standard
However, although it seems there is an -x
(or --exclude
) option to exclude files matching a certain pattern, there is no equivalent --include
option to which I could pass *css
.
Is there perhaps a generic Bash way to filter down these results to CSS files and then mass-delete them?