rodesousa
7/2/2015 - 2:33 PM

dl files from url with wget

dl files from url with wget

wget |curl

#dl tout les tar.gz d'une page
wget -A tar.gz -r -l 1 -nd 
#dl un fichier
curl -O PATH

extraire tout les .tar.gz (mais y'a mieux)

cat *.gz | tar -xf - -i > /dev/null

sort by date

ls -ltr

date

date +%Y-%m-%d-%H-%M

splitWhile

for x in echo "/tmp/rodrigo/roberto" | tr "/" "\n"; do echo $x; done

sed

sed -re 's/hosts: dns files/hosts: files dns/g' -i /etc/nsswitch.conf

reseau

tcpdump -n -i lo host lxpt904a.unix-int.intra-int.bdf-int.local port 514 netstat -i netstat -an | grep 514 ###interface ifconfig -a ifup INTERFACE

scp

Login1@Serveur1:Chemin1/NomFichier1 Login2@Serveur2:Chemin2/NomFichier2

array for

array="/etc/init/mongodb-mms-monitoring
/etc/init/mongodb-mms-backup-daemon
"
for element in $array
do
echo $element
done

rsync

rsync --exclude .git -avu --chmod=go+rX SOURCE USER@HOSTNAME:DEST

lien symbo

ln -frs .vimrc ~/

add un group à un user

usermod -a -G groupname username

port d'écoute de localhost

nmap -sT -O localhost