Get the number of files in a directory
How to the number of files in a directory
ls | wc -l
works well for me.
http://stackoverflow.com/questions/3702104/find-the-number-of-files-in-a-directory
How to the number of files in a directory
ls | wc -l
works well for me.
http://stackoverflow.com/questions/3702104/find-the-number-of-files-in-a-directory
How to change the logo shown during booting in Ubuntu? I originally installed Ubuntu MATE 18.04. But I am using GNOME 3 now by replacing the DE. But the log shown during booting is still Ubuntu MATE’s. How to change it to another one? It is plymouth the application that manages the “splash” screen during…
MediaWiki set’s the default page (the homepage) to the “Main Page” by default. The name “Main Page” is too general and does not give more meanings. Usually for a specific site, we may change it to some meaningful name and URL. This is a configurable in MediaWiki. This tutorial introduces how to change MediaWiki’s Main…
I am looking for a better method for getting the latest commit’s hash in git. I know git log -1 can show the info of the latest commit and from the info of the latest commit I can use grep and other tools to get the hash. Is there better method supported from git? Note:…
How to get the running process’ pid in Python? In Python, you can get the pid of the current process by import os os.getpid() From the official doc: os.getpid() Return the current process id. One example os using os.getpid() to get process own ID: $ python3 Python 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]…
The default display manager on my Fedora 22 is gdm. If I would like to change it to other display manager like KDM, LightDM or other, which is the portable and reliable method? You can use the “system-switch-displaymanager” tools to manage the display manager. This is possibly the most portable way. To install it: #…
How to install ffmpeg on Linux Mint 17 Qiana? To install FFmpeg on Ubuntu 14.04 Trusty Tahr, Linux Mint 17 Qiana and etc: $ sudo add-apt-repository ppa:jon-severinsson/ffmpeg $ sudo apt-get update $ sudo apt-get install ffmpeg Does anyone know why this was taken out of the main repositories? Linux Mint 17 is based on Ubuntu…