Per calcolare l’impronta MD5 di un file su Windows aprire la PowerShell e dare il seguente comando: Get-FileHash -Algorithm MD5 <nomefile>
Month:October 2021
Elenco tabelle
Con psql per ottenede l’elenco delle tabelle usare il comando “\dt“; usando il comando “\dt+” si ottiene una vista dettagliata delle tabelle.
Formattazione output query
Eseguendo query da riga di comando con psql per formattare l’output usare il comando \x on DEPOSITO=# \x onExpanded display is on.DEPOSITO=# select * from “grant” where user_id = 2;-[ RECORD 1 ]———————————————————————————————-id | 17user_id | 2status | draftpermission | documents.readdescription | prova dal 06/10/2021 al 09/10/2021 per il documento: 002.REGISTRO UFFICIALE.2020.0000001.pdf.begins_at |expires_at |created_at | …
Continue reading Formattazione output query
Testare SMTP su TLS
Per testare la raggiungibilità di un server SMTP in TLS usare il comando:
Estrarre un range di orari da un log
Per estrarre le righe corrispondenti ad un range orario/data da un log usare sed con la seguente sintassi: sed -n ‘/<data start>/,/<data stop>/p’ <file> Esempio: sed -n ‘/Mon Oct 4 09:50:13/,/Mon Oct 4 09:50:30/p’ wifi.log
Trovare una stringa in una directory
Per sapere in quali file di una data directory si trova una stringa usare il comando: “grep -r “<stringa>” <path>”