I have a directory src/ that contain many .cc files and its binary. For example:
src/
|_ foo.cc
|_ bar.cc
|_ qux.cc
|_ thehead.hh
|_ foo (executable/binary)
|_ bar (executable/binary)
|_ qux (executable/binary)
|_ makefile
In reality there are many .cc and executable files.
I need to remove those binaries in a global way without having to list all the files. Is there a fast and compact way to do it?
I tried:
$ rm *
but it removes all the files include .cc and .hh files.
I am aware of this command:
$ rm foo bar qux ....
but then we still have to list all the files one by one.