find -L /path/to/dir -name "*name*" -print0 |xargs -0 -r rm
diff fichier1 fichier2
grep -f fichier1 fichier2
- Mount the card
sudo diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/diskX
(find diskX withdiskutil list
)
tar -zxvf file.tar.gz
pidof <process>
Find accented chars on a file:
grep -P -n "[\x80-\xFF]" file.txt
... And invisibles ones:
grep '[^[:print:]]' file
... And solve encoding problems once and forall:
native2ascii fileDépart fileArrivee
diff fileDépart fileArrivee
:.,$d
-> suprime le contenu du fichier depuis le curseur jusqu’à la fin du fichier
:1,$d
-> supprime TOUT le contenu du fichier
:G
-> goto end of file
:%s/foo/bar/g
-> remplacer tout les foo en bar
To see every process on the system using standard syntax:
ps -ef
To see every process on the system using BSD syntax:
ps aux
-ef = full aux = user oriented
Compress a folder
tar czf name_of_archive_file.tar.gz name_of_directory_to_tar
sips -Z 600 *.jpg
-Z : keep proportions 640 : taille heigh max
pdftotext file.pdf -enc UTF-8 - | tr -d "." | tr -s " \n" | wc -c