Home » Misc » Collections of some …

Collections of some bash commands

  • List and delete files not matching a pattern
ls example_doc.* | grep -v *.tex | xargs rm

grep -v carries out the inverse matching.

  • List the hard disks attached to the system
lsblk

or

sudo fdisk -l