mentat mentat@identi.ca
Saint-Georges-la-Pouge, France
Culture unix, logiciel libre, philosophie et cyberpunk.
Command Line Magic at 2010-05-19T21:05:55+00:00
tar zxvf !$:t # Take the last argument from the last command and get the trailing part. Made a typo in previous one. Thanks .@kbomentat likes this.
Command Line Magic at 2010-04-30T04:17:43+00:00
scpphotos2site () { scp -rp "$@" you@yourserver:www/photos/; } # A function to make it easier to move photos to your websitementat likes this.
Command Line Magic at 2010-04-27T12:06:30+00:00
for c in $(locate .crt);do echo -n "$c ";openssl x509 -in $c -dates|grep notAfter|awk -F= {'print $2'};done # List cert expire timesmentat likes this.
Command Line Magic at 2010-04-23T16:48:32+00:00
. .bash_aliases # Re-read your .bash_aliases file. I find its good to put your aliases in a seperate file and put this in your .bashrcmentat likes this.
Command Line Magic at 2010-04-20T16:09:53+00:00
find /home -gid 81 -exec chgrp apache \{} \; # Find files in /home that were group owned gid 81 and change the group to apache.mentat likes this.
Command Line Magic at 2010-04-19T01:06:23+00:00
!!:gs/beer/wine # Run the last command and replace ALL instances of beer with wine, not just the first one like ^beer^wine would do.mentat likes this.
Command Line Magic at 2010-04-15T20:24:56+00:00
mv output{.tmp,} # Move an intermediary file back over its original file without typing the whole name twice.mentat likes this.