Created
April 30, 2009 15:49
-
-
Save schmurfy/104508 to your computer and use it in GitHub Desktop.
shell commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -p 2451 [email protected] 'sudo dd if=/dev/xenvg/box | gzip -c' | gzip -d | dd of=/dev/sda |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo echo letter > /etc/papersize | |
bash: /etc/papersize: Permission denied | |
# To perform redirection with sudo place the command in quotes after sh -c: | |
$ sudo sh -c 'echo letter > /etc/papersize' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macbook:~ sudo ngrep -d en0 -W byline port 80 | |
## | |
T 66.35.250.209:80 -> 10.200.1.40:50710 [AP] | |
HTTP/1.1 200 OK. | |
Date: Fri, 27 Jul 2007 13:45:05 GMT. | |
Server: Apache/1.3.33 (Unix) PHP/4.3.10. | |
Last-Modified: Tue, 28 Nov 2006 13:54:21 GMT. | |
ETag: "219bab-160c-456c3f8d". | |
Accept-Ranges: bytes. | |
Content-Length: 5644. | |
Connection: close. | |
Content-Type: text/html. | |
[...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A> screen -S <name> | |
^A:multiuser on | |
^A:acladd root | |
B> screen -r A/<name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connect through dom0 to virtual machine on mysql port | |
ssh -AC -L 8000:127.0.0.1:8001 <dom0_ip> ssh -NC -L 8001:127.0.0.1:3306 <vm_ip> | |
# connect with any mysql tool on port 127.0.0.1:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment