vrijdag 23 december 2016

How to select files in a directory with the boolean operator AND

I want to select (find/grep/ls) certain files in a directory starting with certain words and ending with a certain extension. Example:
  • bluebelt_hans_hoff.jpg
  • bluebelt_hans_hoff.JPEG
  • bluebelt_peter_gort.jpg
  • bluebelt_peter_gort.JPEG
I only want the files starting with "bluebelt" AND ending with only the ".jpg" extension (and not the JPEG extension). How to do this on the commandline?

Answer:  ls bluebelt* | grep .jpg

Enlarging Libreoffice window completely with command

 You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.