Si j'avais le temps, ca me plairait bien !
-
https://www.reddit.com/r/ricingwtf?
cd dir
time perl -e 'for(<*>){((stat)[9]<(unlink))}'
-
http://www.slashroot.in/which-is-the-fastest-method-to-delete-files-in-linuxKeepalive Notes
A keepalive packet generally has a TCP ACK configured with a sequence number set to one less than the current number used on the connection. Any machine receiving a nudge from such a packet will simply respond with the correct sequence number and, Frankenstein jokes aside, announce that it is indeed alive.
These types of packets are sometimes empty and generally have three associated parameters. The retry parameter will declare how many times to send a packet before coming to the conclusion that the other end of the connection has given up the ghost. The time setting is configured as the frequency of the checks, and finally the interval dictates the length of time between two sent packets if no response is received.
Inside the kernel, you can alter these settings by editing these values in the eye-watering pseudo-filesystem known and loved as /proc. One file, in this case, is /proc/sys/net/ipv4/tcp_keepalive_time, and you can edit it
-
https://tipstricks.itmatrix.eu/using-ss-tool-for-network-troubleshooting/dstat -lrvn 10
via arnaudb
-
https://links.infomee.fr/?qi1ILwedition video sous linux basique
-
https://links.infomee.fr/?-4Pa1w
-
https://puppetlabs.com/blog/sysadvent-so-server-tell-me-about-yourself-intro-facter-osquery-sysdig?ls=social-media&ccn=twitter-product-20141222&cid=701G0000000F68PLiME
Draugr
Volatilitux
Memfetch
Crash utility from Red Hat, Inc
Memgrep
Memdump
foriana
-
http://www.cyberciti.biz/programming/linux-memory-forensics-analysis-tools/plein d'outils network linux
via arnaub
-
http://xmodulo.com/useful-command-line-network-monitors-linux.html
-
https://links.infomee.fr/?AyHsGAwow could be useful
via skunnyk
-
https://github.com/Russell91/sshrcHow to pretty print a json string :
cat pref.json | python -m json.tool
for uuoc nazi ;) :
< pref.json python -m json.tool
or
python -m json.tool < pref.json
-
http://stackoverflow.com/questions/352098/how-can-i-pretty-print-jsonMerci à ce mec, il m'a fait gagner du temps ^^
find my_root_dir -depth -exec rename 's/(.)\/([^\/])/$1\/\L$2/' {} \;
-
http://stackoverflow.com/questions/152514/how-to-rename-all-folders-and-files-to-lowercase-on-linuxya du vrai la dedans :D
-
https://www.youtube.com/watch?v=5pOxlazS3zsrgrep et grep -r sont équivalents : on cherche récursivement
grep -R est légerement différent dans le sens où il va suivre les liens symboliques ce qui peut être plus pratique..
-
https://links.infomee.fr/?xsOUWgLa doc des propriétés : https://github.com/torvalds/linux/blob/master/Documentation/networking/ip-sysctl.txt
Ensuite on peut les définir dans le dossier spécifique à l'interface, exemple : /proc/sys/net/ipv4/conf/eth0/
Ou dans le dossier all : /proc/sys/net/ipv4/conf/all
Exemple :
La valeur pour ehto concernant la propriété arp_filter ne dépend pas seulement de /proc/sys/net/ipv4/conf/eth0/arp_filter mais aussi de /proc/sys/net/ipv4/conf/all/arp_filter
D'après la doc, arp_filter est un boolean (0 ou 1)
D'après ces liens :
http://marc.info/?l=linux-kernel&m=123606366021995&w=2
https://github.com/torvalds/linux/blob/master/include/linux/inetdevice.h (ligne 123 : #define IN_DEV_ARPFILTER(in_dev) IN_DEV_ORCONF((in_dev), ARPFILTER))
On utilise un OR pour déterminer la valeur finale : il suffit qu'un des deux arp_filter soit à 1.
Si la propriété n'est pas un boolean mais un integer qui peut prendre 0,1,2,etc... la valeur choisie entre le "all" et le "eth0" sera la valeur MAX d'après ce que j'ai compris.
On retrouve ce fonctionnement dans d'autres dossiers :
/proc/sys/net # find . -type d -name eth0
./ipv4/neigh/eth0
./ipv4/conf/eth0
./ipv6/neigh/eth0
./ipv6/conf/eth0
Pour consulter :
sysctl -a | grep arp_filter
Pour modifier :
à la volée :
echo "1" > /proc/sys/net/ipv4/conf/...
ou sysctl -w net.ipv4.conf.eth1.arp_filter=1
persistant au reboot :
/etc/sysctl.conf
/etc/init.d/procps restart
à notre un truc vicieux :
/etc/init.d/procps restart n'a pas le meme effet qu'un reboot complet
si on set une propriété à la volée à 1 comme net.ipv4.conf.eth1.arp_filter par exemple
elle va rester à 1 apres un /etc/init.d/procps restart
par contre elle se remet bien à 0 apres un reboot
-
https://links.infomee.fr/?ztr7EAAu cas ou un jour je passe mon desktop sous linux.
via arnaudb
-
http://p3ter.fr/article53/optimiser-son-ssd-sous-linuxTiens je connaissais pas ce blog de bluetouff
-
http://cypherpunk.fr/distributions-gnu-linux-orientees-securite/Sympa tous ces one liners ! il y a même un repo dans lequel on peut ajouter les siens : https://github.com/fxn/tkn
Mes préférés :
$ echo "!!" > script.sh
$ cp file.txt{,.bak}
$ (cd /tmp && ls)
$ nc -l 5566 > data-dump.sql
$ nc <his-ip-address> 5566 < data-dump.sql
via Olivier
-
http://arturoherrero.com/2013/11/29/command-line-one-liners/pour voir les limites d'un user : ulimit -a <user>
Pour setter définitivement : voir fichier /etc/security/limits.conf et limits.d
Pour setter on the fly, par exemple pour les open files : ulimit -n 32000
-
http://superuser.com/questions/579692/ulimit-nofiles-and-lsofParce qu'avec l'outil par défaut proposé par gnome3, on ne peut pas faire d'annotation.
-
http://lifehacker.com/5889994/the-best-screen-capture-tool-for-linuxUne commande qu'elle est bien :
namei /path/to/the/deepest/file
Affiche toutes les permissions + les owners de toute l'arborescence jusqu'au fichier.
via nicolasc
-
http://linux.about.com/library/cmd/blcmdl1_namei.htmA mettre au début d'un script qui se trouve dans un des dossiers /etc/cron.xxxx pour qu'il soit éxécuté par un utilisateur autre que root.
USER='some-low-privilege-user'
if [ whoami != "$USER" ]; then
sudo -u $USER "$0"
exit
fi
... rest of the script ...
-
http://www.fogel.ca/2010/08/07/elegantly-dropping-priviledge-in-an-etccron-daily-script/Parait que ça va plus vite que ack
à tester
-
http://robots.thoughtbot.com/faster-grepping-in-vim/Outils en ligne de commande pour trouver ce qui occupe de la place, bien pratique
-
http://dev.yorhel.nl/ncdu/manTools de monitoring à tester
via ArnaudB
-
http://nmon.sourceforge.net/pmwiki.phpSwaks is a featureful, flexible, scriptable, transaction-oriented SMTP test tool written and maintained by John Jetmore.
-
http://www.jetmore.org/john/code/swaks/ifconfig netstat route .. autant de cmd à abandonner!
-
https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/distrib firewall
-
http://www.ipcop.org/Bon article pour comprendre un peu mieux les histoire d'io
-
http://blog.developpeur-neurasthenique.fr/auto-hebergement-iowait-ma-tuer-1-2-vmstat-mpstat-atop-pidstat.htmlParfois il arrive qu'un fichier de conf soit corrompu a cause dun caractère invisible a la con qui peut venir dun copier coller ou autre.. Pour vérifier ça, on peut dumper le fichier en affichant ces caractères : car -e fichier
-
https://links.infomee.fr/?s1J7bQPour comprendre un peu mieux certaines subtilités de rsync + compléter mémo
-
http://www.jveweb.net/en/archives/2010/11/synchronizing-folders-with-rsync.html#jveweb_en_014_02Petit outil sympa qui donne l'explication de n'importe quelle commande shell (on peut c/c ce qu'on veut)l
-
http://www.explainshell.com/Il peut arriver qu'un package ait un comportement anormal, on peut alors se demander si les fichiers n'ont pas été modifié à la main... (environnement de dev, coucou)
Heureusement rpm stocke plusieurs infos sur les fichiers originaux et permet de vérifier si il y a eu ou non des modifications. L'option magique est -V
rpm -Va --> vérifie TOUS les packages
rpm -V nom_du_package --> vérifie seulement le package concerné
-
http://www.novell.com/coolsolutions/feature/16238.htmlrun gnome-tweak-tool, "theme", and change keybinding theme to default
-
http://askubuntu.com/questions/73954/ctrla-does-not-work-in-all-programsPour créer une archive de la forme latest_2013-05-19-04-05-23.tar.gz ou .zip
dotd=date +%F-%H-%M-%S
tar -pczf /tmp/lastbackup/latest$dotd.tar.gz /var/cache/rsnapshot/hourly.0
zip -y -9 -r /tmp/lastbackup/latest$dotd.zip /var/cache/rsnapshot/hourly.0
L'option -y permet de ne pas suivre les liens symboliques (ce qui faisait planter mon backup). A enlever si nécessaire.
-
https://links.infomee.fr/?xC6EMADes exemples de commandes hping3 pour réaliser des tests sur des firewall
-
http://0daysecurity.com/articles/hping3_examples.htmlethtool to get info about network
-
http://www.linuxcore.fr/2012/01/ethtool-le-reseau/group passwd hosts services
-
http://renaud.masse.free.fr/projets/nis/node38.htmnload sur debian pour monitorer en temps réel la bande passante d'un serveur
-
http://linuxaria.com/article/monitor-your-bandwidth-from-the-linux-shell?lang=enPour télécharger des images testing de debian (pas forcément simple de trouver le bon endroit sur le site..)
Ici les wheezy à l'heure actuelle
-
http://www.debian.org/CD/http-ftp/Ok the title may need some work but I am really excited that I found a way to make virtually any application to run over a SSH proxy without having to directly have support for the SOCKS protocol.
The first thing you need to do is go to SourceForge and download an application call proxychains. If you are using a debian based distribution, particularly Ubuntu you can simple use
sudo apt-get install proxychains
Once you have installed proxychains you need to connect via SSH to your SSH serve. You can use something like this:
ssh -fqND 5555 yanovich@10.28.183.40
This creates a connection to your ssh server and lets it run in the background. The 5555 is the port number it will run on the local level (the computer you can running proxychains from).
Next you need to edit /etc/proxychainds.conf (you'll need sudo permission to do this).
Uncomment "dynamic_chain" (by removing the # at the beginning of the line)
comment out "strict_chain" by adding a # to the beginning of the line.
Uncomment "quiet_mode" (This is not recommended the first time you do this. I would recommend doing this the second through once you are familiar with this and can see it is working).
Add "socks5 127.0.0.1 5555" on a new line at the bottom of the file.
Save
Now run the program you want to have applied this settings towards. For my situation I wanted to be able to use Opera Web Browser over SSH proxy but Opera doesn't have built-in SOCKS support.
$ proxychains opera
That line of code in the terminal will launch the Opera Browser and direct all traffic through the SSH proxy.
The above is recommended to be used for applications that do not natively support SOCKS. I would recommend doing the above in addition to apply a system wide setting (for Ubuntu you can do this through System > Preference > Network Proxy).
-
http://opensource.osu.edu/node/122next generation linux shell
-
http://acko.net/blog/on-termkit/pour récup une ressource protégée par un wget, utiliser ces deux parametres dans la commande wget : --http-user=user --http-password=password
-
http://linuxfr.org/forums/g%C3%A9n%C3%A9ralg%C3%A9n%C3%A9ral/posts/wget-et-protection-htaccessUn outils sous linux pour faire des screecast
Format de sortie en ogv
gtk-recordmydesktop
-
http://recordmydesktop.sourceforge.net/about.php[09:18:59] amm@lynch:/usr/share/applications$ cat eclipse.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Eclipsee
GenericName=Eclipsee
Exec=/home/amm/bin/ecl_launch.sh
Icon=/home/amm/bin/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development;
une fois qu'on a fait ça, l'application est accessible dans les menus et aussi accessible pour créer un launcher
-
https://links.infomee.fr/?c7Rijg