Utiliser des enum de Java5 avec Hibernate
How to launch a single Unit Test with Maven 2?
Use this:
mvn -Dtest=MyPersonnalUnitTest test
(unlike with Maven 1, you do not need specify the complete package name!)
Automatic update with TortoiseSVN
On my current position, I had to update my project with Subversion every morning. It took half an hour every day ; some other guys prefered to update only once a week or twice a month… But they accepted to spend half a day for merges etc.
Yet, I found a way to make this update automatically, thanks to a planned task in Windows XP.
The command that is launched is
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"C:\the\path\of\my\project" /notempfile /closeonend
Thanks to another planned task, I rebuild the complete project with Maven. And on breakfast I find my project up-to-date with all jars compiled and available.
Comment supprimer tous les accents, cedilles, etc. d’un texte en francais sous Unix?
Il suffit de lancer la commande suivante, en passant eventuellement en parametre le fichier source (sinon c’est l’entree standard qui sera utilisee):
tr "àçéèêëîïôöùüÂÇÉÈÊËÎÏÔÖÙÜ" "aceeeeiioouuACEEEEIIOOUU"
How to replace all lower case with upper case in Unix?
Use one of the three following commands:
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZtr a-z A-Ztr '[:lower:]' '[:upper:]'
Remove duplicated lines from a file
Abstract: you have to remove duplicate lines in one file. For instance, you have a file:
foo1
foo2
foo2
Solution: use this command:
uniq myFile.txt
You’ll get:
foo1
foo2
| uniq myFile.txt |
Sort the content of a file
Case: you have to sort the content of a file in Unix.
Solution
sort -d sourceFile > destinationFile
How to find all the files of which size is greater than a given value?
Abstract: we need to retrieve all the files in current folder (and its sub-folders) of which size is greater than 10 Mo
Use:
find . -type f -size +10000 -print