find ./ -name "*.logfile" | xargs -i mv '{}' /my/really/great/implementation_scripts/log_directory/
(cf : http://bturnip.com/weblog/?p=248 )
or :
find ./ -name "*.logfile" -exec mv '{}' /my/really/great/implementation_scripts/log_directory/ \;
find ./ -name "*.logfile" | xargs -i mv '{}' /my/really/great/implementation_scripts/log_directory/
(cf : http://bturnip.com/weblog/?p=248 )
or :
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
sudo touch /sbin/mount_ntfs sudo chmod 0755 /sbin/mount_ntfs sudo chown 0:0 /sbin/mount_ntfs sudo emacs /sbin/mount_ntfs
#!/bin/bash VOLUME_NAME="${@:$#}" VOLUME_NAME=${VOLUME_NAME#/Volumes/} USER_ID=501 GROUP_ID=20 TIMEOUT=20 if [ `/usr/bin/stat -f "%u" /dev/console` -eq 0 ]; then USERNAME=`/usr/bin/defaults read /library/preferences/com.apple.loginwindow | /usr/bin/grep autoLoginUser | /usr/bin/awk '{ print $3 }' | /usr/bin/sed 's/;//'` if [ "$USERNAME" = "" ]; then until [ `stat -f "%u" /dev/console` -ne 0 ] || [ $TIMEOUT -eq 0 ]; do sleep 1 let TIMEOUT-- done if [ $TIMEOUT -ne 0 ]; then USER_ID=`/usr/bin/stat -f "%u" /dev/console` GROUP_ID=`/usr/bin/stat -f "%g" /dev/console` fi else USER_ID=`/usr/bin/id -u $USERNAME` GROUP_ID=`/usr/bin/id -g $USERNAME` fi else USER_ID=`/usr/bin/stat -f "%u" /dev/console` GROUP_ID=`/usr/bin/stat -f "%g" /dev/console` fi /opt/local/bin/ntfs-3g \ -o volname="${VOLUME_NAME}" \ -o local \ -o negative_vncache \ -o auto_xattr \ -o auto_cache \ -o noatime \ -o windows_names \ -o user_xattr \ -o inherit \ -o uid=$USER_ID \ -o gid=$GROUP_ID \ -o allow_other \ "$@" &> /var/log/ntfsmnt.log exit $?;
Ca fonctionne plutôt bien. Mais vous noterez en particulier le problème posé par ce script en cas de multi-users sur la mac.
replicatorg --nogui
replicatorG https://github.com/haldean/ReplicatorG
"The transparent multi-hop connections can be very useful but you may find that it takes a second or two to establish each connection. This delay can become annoying if it happens a lot (e.g.: every time you save a file from the text editor).
The good news is that if you can configure SSH to reuse an existing connection. This means that for example if you have an SSH shell session running then a new connection for SCP can skip the connection setup phase. Two steps are required:
First, you must create a directory (or 'folder') which SSH will use to keep track of established connections:
mkdir ~/.ssh/tmpNext, add these two lines at the start of your ~/.ssh/config (make sure to use your username in place of 'YOUR-NAME'):
ControlMaster auto ControlPath /home/YOUR-NAME/.ssh/tmp/%h_%p_%r
As you can see, a small investment in time setting up your SSH configuration can pay back dividends in convenience."
Copier toutes l'historique d'un repository SVN auquel vous avez accès (en lecture),
mais pas les droits d'administration :
svnadmin create localrepos emacs localrepos/hooks/pre-revprop-change # make it 'exit 0' chmod +x localrepos/hooks/pre-revprop-change svnsync init --username USERNAME file:///path/to/localrepos https://myproject.googlecode.com/svn Copied properties for revision 0. svnsync sync --username USERNAME file:///path/to/localrepos
Source : http://code.google.com/p/support/wiki/SubversionFAQ#How_do_I_download_my_Subversion_history?
Donc :
$ svnadmin creat localrepos
$ cat > localrepos/hooks/pre-revprop-change
#! /bin/bash
exit 0
$ chmod a+x localrepos/hooks/pre-revprop-change
$ svnsync init --username USERNAME file:///NEWREPO https://OLDREPO
Copied properties for revision 0.
$ svnsync sync --username USERNAME file:///NEWREPO
[...copie de toutes les révisions...]
Sur la machine où j'ai copié l'historique, j'ai du utiliser une feinte :$ svnadmin setuuid UUID-OLDREPO
Puis, pour changer les "checkouts" de source, svn switch :$ svn switch --relocate https://OLDREPO svn+ssh://NEWREPO