Aashish's blog

Unix crashcourse

• unix, shell, and shellpower

Following is a list of basic shell commands for Unix:

ls

ls -l 

Outputs

drwxr-x---   2 akarki15 akarki15       6 Jun  2  2011 bin
-rw-r-----   1 akarki15 akarki15 4194304 Apr 22  2014 block-device.data
drwxrwxr-x  17 akarki15 akarki15    4096 Feb 28  2014 cs111
drwxr-x---  19 akarki15 akarki15    4096 May 28  2014 cs112
drwxr-x---   6 akarki15 akarki15     147 May 10  2014 cs-261
drwxr-x---   3 akarki15 akarki15      18 May  1  2013 CS281

How do you change the access settings?

Some switches for ls

Command Description
ls -a shows “all” files
ls -d a* Wildcard to display all files whose filename begins with a
ls -d [i-l]* [i-l] is a set containing letters i through l

Cool things you can do with dot dot (..) and tilde (~)

	cat ../a.java

Using History

 5673  ssh -Y akarki15@romulus.amherst.edu
 5674  cd Desktop/jam/blog/
 5675  jekyll build
 5676  jekyll serve

.cshrc file

Random cool monitors

All about that stream

Pipe command

	prog1 < file1 | prog2

Suspend/resume jobs aka COOL STUFF

grep

Tar Tricks

foreach i (*.txt)
	foreach? cp $i `basename $i .txt`.save
	foreach? end