Changes

Linux Commandline Stuff

1,921 bytes added, 16:22, 16 March 2013
no edit summary
[[Home | <<< back to Wiki Home]]
Linux Commandline Stuff  =uuencode===make random text file==*put this in <code>make_random.sh</code>:<pre>head -c 100000 < /dev/random | uuencode -m - | tail -n 100000 > out.txt</pre>*see http://old.roberttwomey.com/uuencode/index.php ==encode image as text==*turning image to text: <pre>cat urs\ fischer\ 3.jpg | uuencode -m -o ursfischer.txt usfischer.jpg</pre>==decode text as image==*extract image: <pre>uudecode ursfischer_alt.txt </pre> = du to list size of subdirectories = * list size of subdirectories in human readable format: <code>du -skh*</code>* to sort by size: <code>du -skh * | sort</code> = add remote git repository = adding dxarts git repository<code> 505 git clone git@code.dxarts.washington.edu:gitosis-admin.git 506 ls 507 cd gitosis-admin/ 508 ls 509 ll 510 vi gitosis.conf 511 git status 512 git add -u 513 git status 514 git commit 515 git commit 516 git status 517 git push </code> *create empty local repository<pre>cd my_projectgit initgit add *git commit -m "My initial commit message"git remote add origin git@example.com:my_project.gitgit push -u origin master</pre> *adding remote repository and pushing to it:<code> 664 git status 665 git remote add origin git@code.dxarts.washington.edu:oftwomey.git 666 git status 667 git push origin master 668 git 669 ls 670 git push</code> 
= remove page numbers in place with perl =
= Rsync =
==rsync personae data to minibeast==
*from Persona directory on local: <code>rtwomeys-work-object-2:Personae rtwomey$ rsync -avz --stats --progress . 192.168.1.31:/Volumes/Cistern/Personae/</code>
==rsync to transfer files to server ==
*local current directory to home/pictures directory:
</pre>
= finding things with grep = == finding files recursively with ls and grep ==
* find this filename in a recursive search and show previous 30 lines of result:
<codepre>ls -laR . | grep -b30 "scale_signal.o" </codepre> == finding text within files recursively with grep ==<pre>grep -Hrn 'HTS_Pauses' meghan_festival/</pre>
= forwarding localhost mysql to a remote machine =
= Open Files from Command Line (OS X) =
*<pre>open -e solipsist\ dialog\ 20120610\ storefront.txt </pre>
 
=use sed to search and replace a file in place=
<pre>sed -i .bak 's/na_play/play/g' bin/prompt_them </pre>
=gphoto2=
*http://photolifetoys.blogspot.com/2012/08/control-your-camera-with-gphoto2-via.html