rpm -ql <package>
Month: August 2025
Check package version using rpm
rpm -qa *intel*
rpm -qa | sort | grep intel
Batch process all files in a folder
#!/bin/bash
for file in <path>/*; do
dcm2pnm "$file" "$file".png --write-png
done
Count the number of files in a directory
ls -l | wc -l
wc: word count
Check Linux OS version
cat /etc/os-release
Search installed packages using rpm
rpm -qa --last | grep <something>
Check where python packages are installed in a docker
Usually here:
/usr/local/lib/<python version>/site-packages
Or
pip show request <package name>
Check libraries related to a binary
ldd /usr/local/bin/<name>* | grep <something>
Instantiate template class or function in cpp
Class:
template class A< ConcreteType >;
Function:
template void A::function< ConcreteType >( int, float );
Note, add namespace if necessary.