Linux tips and tricks

Redirect while preserving the “back button” functionality in php

index.php:

<?php
header(“Location: http://www.hartvig.de”); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>
Batch rename files from htm to html
for file in *.htm ; do mv $file `echo $file | sed ‘s/\(.*\.\)htm/\1html/’` ; done

Control remote desktop with local keyboard and mouse

ssh -X 10.0.0.8 “x2x -west -to :0.”

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>