-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To solve your first point, try: sudo sh -c "echo whatever >file" This is needed because the redirection operator will be taken by your own shell, not the one that is being run by sudo, thus you will get a permission denied error. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkifaZQACgkQTsjaYASMWKQYXQCfehG6UusGjmKUW8+QCTs3L0qi sIIAn0NP5dHogy2udo+c1AK+FnDJcMFc =Dlnq -----END PGP SIGNATURE-----