Changes

Jump to: navigation, search

Linux Commandline Stuff

15 bytes removed, 19:02, 26 September 2012
no edit summary
[[Home | <<< back to Wiki Home]]
== Linux Commandline Stuff ===== remove page numbers in place with perl ===
<code> perl -pi -e "s/p+\s+\d+(-\d*)*\.|p+\d+(-\d*)*\.//g" reading.txt </code>
=Rsync = == rsync to transfer files to server ===
*local current directory to home/pictures directory:
<code>rsync -avz --stats --progress Pictures roberttwomey.com:~/pictures/</code>
*grab documents from online backup:
<code>rsync -n -h -e ssh -avz --stats --progress b393466@hanjin.dreamhost.com:~/Documents/dxarts473_s11/ Documents/</code>
==== rsync push.sh ====
with optional delete
<pre>
</pre>
==== rsync pull.sh ====
<pre>
</pre>
=== finding things with ls and grep ===
* find this filename in a recursive search and show previous 30 lines of result:
<code>ls -laR . | grep -b30 "scale_signal.o" </code>
=== forwarding localhost mysql to a remote machine ===
* do this to connect to 192.168.0.39 for instance:
<code>ssh -f -L 3306:localhost:3306 rtwomey@192.168.0.39 sleep 10</code>
ssh -fNg -L 3306:localhost:3306 rtwomey@192.168.1.191
</code>
=== grabbing a website with wget ===
*grab a website recursively
<code> wget -r --level=1 http://www.ppc.sas.upenn.edu/ppquestionnaires.htm </code>

Navigation menu