Linux shell commands

Remove duplicated empty lines:

cat -s file.txt

Find Windows OEM license key in BIOS:

strings /sys/firmware/acpi/tables/MSDM | grep ".-.-.-.-.*"

Copy file between two hosts directly:

scp -3 host1:/src.file host2:/dst.file

Prepend all lines with timestamp:

ls -la | ts '[%Y-%m-%d %H:%M:%S]'

Last updated on 2022:12:07 at 00:05 UTC

Leave a Reply

Your email address will not be published. Required fields are marked *