Created on 07 Sep 2015 ; Modified on 08 Feb 2019
... relativi ad attività utili ma non frequenti
Andare in edit del file /etc/sysconfig/keyboard
, si presenterà con
un layout simile al seguente:
KEYTABLE="us" MODEL="pc105" LAYOUT="us" KEYBOARDTYPE="pc"
modificare il codice "us"
(o altro analogo) con quello d'interesse, ad esempio
"it"
, salvare il file e riavviare.
Quando si chiude il prompt dei comandi, si eliminano tutti i programmi avviati durante la sessione di lavoro. Anche quelli avviati in background.
E' possibile far sopravvivere un comando utilizzando il programma nohup
come segue:
nohup comando parametri &
Attenzione ai seguenti aspetti:
(echo yes | nohup comando parametri) &
nohup.out
, quindi per sapere che sta succedendo, riaperto il terminale, è possibile
dare il comando tail -f nohup.out
Gateway in: /etc/sysconfig/network
NETWORKING=yes HOSTNAME=localhost.myserver GATEWAY=192.168.1.1
Scheda di rete in: /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 BOOTPROTO=none HWADDR=XX:XX:XX:XX:XX:XX TYPE=Ethernet UUID=xxxxxxx-xxxxxx-xxxx-xxxx-xxxxxxxx BROADCAST=192.168.1.255 IPADDR=192.168.1.44 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes
DNS in: /etc/resolve.conf
search myserver nameserver 192.168.1.1 nameserver 8.8.8.8
Check:
ifconfig route -n
Il routing deve essere:
Destination Gateway genmask flag Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0. UG 0 0 0 eth0
vi /etc/crontab
cat /etc/*release*
uname -a
df -h
du -sh directory
In particolare, per controllare chi impegna più disco:
du -kscx * | sort -n
(ringraziamenti a toppledwagon in How can I determine what is taking up so much space? [duplicate])
rpm -qa
yum list installed
unzip filename.zip
creare l'archivio:
tar -cvf tar-name.tar /path/to/dir
estrarre l'archivio nella directory tar-name
:
tar -xvf tar-name.tar
creare l'archivio, compresso gz:
tar -zcvf tar-name.tar.gz /path/to/dir
estrarre l'archivio gz nella directory tar-name
:
tar -zxvf tar-name.tar
creare l'archivio, compresso gz, inclusi i permessi:
tar -pzcvf tar-name.tar.gz /path/to/dir
estrarre l'archivio gz nella directory tar-name
, ripristinando i relativi permessi:
tar -pzxvf tar-name.tar
(ringraziamenti a Brett Popoleo in Create and extract a .tar.gz archive using command line
e nixCraft in Creating A tar File in Linux Via Command Line Options)
md5sum /path/to/file