Create tar.gz file with tar command
tar -czvf filename.tar.gz /path/to/folder
Untar tar.gz file
tar -zxvf filename.tar.gz /path/to/folder
Interactive Process Manager
$ htop
Monitor Nvidia GPUS
$ nvidia-smi
Number of files in directory
ls -1 | wc -l
Number of files in a directory and all subdirectories
find [folder-name]/ -type f | wc -l
Size of folder
du -sh [folder-name]/
Move first 100 files from one folder to another
mv `ls | head -100` ./destination_dir
Check if port is in use
netstat -an | grep PORTNUMBER | grep -i listen
(If the output is empty, the port is not in use)
Show all the firewall rules as defined on your system
iptables -L -n
Copy / move files based on modified date (Source)
find /path/to/folder -type f -mtime -1 -exec mv {} /path/to/new/dir \;
Find files that have timestamps after 2024-04-10 00:00 and before 2024-04-12 23:59
find -type f -newermt 2024-04-10T00:00 ! -newermt 2024-04-12T23:59
Show disk usage
sudo ncdu /path/to/folder