Unix Command Line
One of the scariest things about using a Unix based system is learning the file architecture and running programs through the command line interface, especially if you’ve be brought up on Windows as many of have!
Well thankfully, we here at MESA sympathise and we have found a few resources to help you out. A great series of introductory screencasts on the unix shell can be found here, and a list of the more common commands and their effect is compiled below.
Directories
/ “root” directory
/usr directory usr (sub-directory of / “root” directory)
/usr/potato potato is a subdirectory of /usr
. current directory
.. parent directory to current directory
Navigating
pwd Show the “present working directory”, or current directory.
cd Change current directory to your HOME directory.
cd /usr/potato Change current directory to potato
cd INIT Change current directory to INIT which is a sub-directory of the current directory.
Listing
ls list contents of a directory
ls -l list a directory in long (detailed) format
ls -a List the current directory including hidden files. Hidden files start with “.”
ls -F lists contents of directory with all sub-directories followed with a /
Permissions
chmod u=rwx file Changes the permissions of file to be rwx for the user
You must be the owner of the file/directory or be root before you can do any of these things.
Moving
cp file1 file2 copies file1 and names the copy file2
mv file1 newname move or rename a file
mv file1 ~/AAA/ move file1 into sub-directory AAA in your home directory.
rm file1 remove or delete file1
mkdir dir1 create directory dir1
mkdir -p dirpath create the directory dirpath, including all implied directories in the path.
rmdir dir1 remove an empty directory
Viewing
cat filename Dump a file to the screen in ascii.
head filename Show the first few lines of a file.
head -n filename Show the first n lines of a file.
tail filename Show the last few lines of a file.
tail -n filename Show the last n lines of a file.
Upcoming Events
“The practical application of stats for experimental research scientists”
Presented by Dr Dalice Sim from VUW’s School of Mathematics, Statistics and Operations Research. This one hour seminar will focus on statistics concepts that are important when undertaking experimental research such as:
-How uncertainty propagates when manipulating data
-How to consider error when fitting to data
-How to effectively and efficiently explore the parameter space for a new experiment.Tuesday 21th May 2013, 3.00pm. Location: AM101, VUW (Wellington)
Alumni & Members: Join the MacDiarmid LinkedIn Group
MESA and the MacDiarmid Institute would like to invite you to connect to our official LinkedIn group, host to all of the Institute's members and alumni. These include many of New Zealand's leading researchers in nanotechnology and materials science, plus alumni pursuing careers abroad. Join us to network with current and former MacDiarmid researchers!MacDiarmid Research Commercialization Fellowships
A new and exciting initiative is being developed, offering business experience in science entrepreneurship and commercialization, all while getting paid! Details here. To register your interest, fill out this survey .MESA Twitter Feed
- No public Twitter messages.
Recent MESA Blog Posts
- Science Media SAVVY workshop report from Lisa Strover, MESA-Sponsored Attendee
- MacDiarmid Student and Postdoc Symposium 2012
- Transit of Venus Forum Impressions from Riyad Mucadam, MESA-Sponsored Attendee
- MESA Sponsored Attendance to the Transit of Venus Forum
- Data analysis and plotting with free and open source tools
Suggestions
If you have any suggestions on how to improve this content, or any other feedback, please contact us.



