dinsdag 10 april 2018

To count the number of files and folders in a directory

$ echo $(($(ls -l | wc -l) - 1)) (count files AND folders in folder)

$ echo $(($(ls -lA | wc -l) - 1)) (including hidden files)

$ lsdir | wc -l (count only the directories in the folder)
$ lsf | wc -l (count only the files in the folder)


Enlarging Libreoffice window completely with command

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