For safety reasons we do no longer show here the specifications for our machines. Use this link (SEMachines.html) to access the description (access restricted).
Most of our servers belong to a cluster of simulation servers. Find here more information on the basic philosophy behind our simulation servers. For the software please see RAMSES (Research Aids for Modeling and Simulation of Environmental Systems, notably the software layer RASS (RAMSES Simulation Server).
Any hints on the usage of OS X via the Aqua interface are on page Mac Hints - OS X.
OS X is based on Darwin. Similar to Solaris on our Suns, Darwin is a BSD Unix. This web page is for you when you use OS X via the application Terminal. This application is located within your Applications folder within folder Utilities (/Applications/Utilities/Terminal.app). All what you find on this web page should apply to Darwin as well.
RASS has a home page.
Typically working with RASS on a Unix host (Sun or OS X simulation server) goes as follows:
To this end mount the Unix host, e.g. by afp (formerly called AppleShare). Then create a directory (folder) into which you transfer your MDP by drag and drop. If your MDP requires more than just a program module, simply upload all these files together with the main program module.
Alternatively you may use scp
(secure copy), a
sftp
client such as VicomSoft FTP Client
or
ftp
client such as Fetch
or some other client,
which manages to upload the files. Note, however, most ftp
clients such as Fetch
will most likely change the content of
each text file during upload. In some cases this may be ok, in others this
may be a problem. Note, that the RASS utilities such as
prepare
will take care of the file formats. Therefore, for
beginners it is recommended to use AppleShare (transfer does not change the
content of files) for managing your files on one of our Unix hosts. Finally
note, this offers also the advantage of being able to use Alpha to edit the
content of files, which reside remotely on the Unix machine.
Login via a secure shell terminal program, e.g.
Terminal
(OS X standard application) or NiftyTelnet 1.1 SSH r3
.
After a login you get started by typing the command
Everything else should follow from there.
RASSHelp
Note, you get the E-mail only if you have installed your MDP correctly, notably
asked for sending the E-mails to your ordinary E-Mail address.
Otherwise you may have to change the settings, e.g. by using RASS utility
setRASSmailto
less
to look at the job's protocol, or you may wish to
download the result files to your own machine.
IMPORTANT NOTE: Unless explicitely stated none of our simulation
servers does backup data! Thus it is fully your responsibility to ensure
that nothing important gets lost.
It is recommended to use either sftp
, scp
or
afp
to accomplish this. Note, if you have generated a stash
file during your simulation experiment, you can look at your results
interactively from within the RAMSES shell, using the "Post Analysis
Session" (note, stash files are simple text files).
-d
, i.e. mk -d
or mk1 -d
...
. The current debugger offers some interactivity and can be
controlled in the following manner:
debug.dat
and
debug.in
. The file debug.dat
defines all paths
needed to access any source code (any row starting with 'M' for any files
with extension 'MOD') and for reference information (any row starting with
'R' for files with extension 'MREF'). The file debug.in
controls the behavior of the debugger, which is relevant in any batch use.
This function is currently not fully implemented, and merely the presence
of this file causes the debugger display to terminate by "exit (-1)".
Later implementations should allow to control the behavior of the debugger
by a sequence of keyboard entries.
Note, we have also several other documentations, which should help you to get going with RASS. See our series of "Systems Ecology Reports", notably reports 14, 9, 20, 21, and 23.
Visit the RASS home page for further links and literature.
man <cmd>
where <cmd>
stands for any command you know and you wish
to learn more about its use. Click here... for more on this.
Check also your environment variable MANPATH
, e.g. by entering
Ensure it contains all those paths where
man pages reside and which you wish to access while using man. In many
cases it is sufficient to enter the following line into your invisible
echo $MANPATH
~/.profile
file:
The following commands
export MANPATH=/usr/share/man:/usr/local/share/man:/usr/local/man:/usr/X11R6/man
lets you easily edit that file. Alternatively you may add any missing path(s) to file
cd ; open -a AlphaX .profile
/usr/share/misc/man.conf
similar to this:
If not empty by system default extend environment variable MANPATH similar to this:
...
MANPATH /usr/local/share/man
MANPATH /usr/local/man
...
export MANPATH=$MANPATH:/usr/share/man:/usr/local/share/man:/usr/local/man:/usr/X11R6/man
To set or change your password use the command
everything should follow from there. For security reasons
(IMIPORTANT!) make sure you follow
the ETHZ's password recommendations as described in our
Shadow home page under link "Hints on passwords".
passwd
To fix on the fly Backspace resp. delete, type command
where X is the key which should do the delete of the previous char.
stty erase X
Backspace in MacSamson: Use menu command 'Terminal Settings...' and activate 'DELETE does BACKSPACE'. Then backspace key on Mac keyboard should also behave as desired.
Traditionally this command is used to modify the UNIX file access permissions of files and directories. Use man to learn about the command or visit here.
These days access permissions are defined by ACLs (Access Control List), which define the privileges granted to each user. They are more cumbersome to manage. Learn about currently set ACLs with command
ls -leTo get rid of inadvertently set ACLs may be difficult and I found the following useful
sudo echo | sudo chmod -R -E ./*to delete all ACLs recursively from the files in the current working directory in cases where everything else failed (Note, command
acl
may also be useful in this context).
Note, extended attributes is again something different and should not be confounded with ACLs. They are listed by
ls -la@They do not control access permissions, but contain extra information in form of any number of strings attached to any given file. To delete any of them you need command
xattr -d
and the exact content of individual strings and the syntax of the
command to delete one extended attribute is this:
xattr -d "<extended attribute text>" <pathfilename>Ex.:
xattr -d "com.apple.metadata:kMDItemWhereFroms" ~/Documents/MyFile.txtOn older OS X systems confusingly the
xattr
command has no man page, but it
gives usage information with the -h
flag. OS X 10.5.x (Leopard)
issued warning before opening a freshly downloaded file makes use of extended
attributes. You can prevent this with a command such as
xattr -d com.apple.quarantine <downloaded_file>Executing above using an AppleScript allows to automatically delete the hereby used extended quarantine attributes. Attach such an AppleScript as a folder action to the Downloads folder (Lift the Leopard download quarantine).
Find an excellent discussion of permissions and attributes at File permissions and attributes.
du -sh *lists you the size of the directories in the current working directory and
du -shgives you the total size occupied by the current working directory.
du -sh Publicgives you the total size occupied by the designated directory, here
Public
.
To geta list of all commands you recently used, enter
fc -lnThis gives you a history without numbers for easy copy pasting. Note the mere option
-n
would open a file with vi and
is usually not what you want.
Unix Manual Page for fc
Of course to get just some of the most recently used commands, simply use cursor <up> and <down> keys.
Create a symbolic link, for instance to a directory, by entering e.g.
ln -s MyDir linkToMyDirThe first argument
MyDir
is the actual
directory holding any file physically. The second argument
linkToMyDir
ist the symbolic link. Note, the
symbolic link behaves exactly as its real counterpart.
A symbolic link looks like this in a directory listing.
E.g. ls -l
in my home directory may
return following result after I have defined above
symbolic link:
/home/afischli/linkToMyDir -> /home/data1/MyDirCheck it out.
This command can be used for many purposes, one of them being to learn about internet traffic. The latter may be useful while debugging firewall settings. E.g. the command
lsof -nP | grep TCPlists all current TCP connections.
Some commands require an argument with file names.
This argument can either be a specific file or a list of operands,
i.e. list of files. E.g. grep
is a command which can
be used in such a way:
grep myfiles todirSome of these commands still use standard input or standard output. Thus it is not trivial to use a command which generates a list of files on standard output and to feed that list to another command which requires a list of files. This is exactly where
xargs
comes handy. E.g.
ls | xargs grep "pattern"The first command generates a list of files.
xargs
feeds those files as operands
to the subsequent command grep
.
In addition to the usual redirections of standard input and output using <, >, <<, or >>, respectively, you can also redirect standard error. Unfortunately the syntax differs greatly from shell to shell. Here some examples, which should get you going quickly:
Merge standard output and error onto standard output:
task |& tee filename
task 2>&1 | tee filenameNote that the order of redirections is significant. For example, the command
task > dirlist 2>&1directs both standard output and standard error to the file dirlist, while the command
task 2>&1 > dirlistdirects only the standard output to file dirlist, because the standard error was duplicated as standard output before the standard output was redirected to dirlist.
Redirect standard output and standard error onto 2 different files named filename1 and filename2:
(task > filename1) >& filename2
To find a file in the file hierarchy starting from current directory,
type a find command similar to this example
with a bash shell modify the command to
find . -name "*.R" -print |& grep "Permission denied" -v
A more robust alternative searching for all files with extension
find . -name "*.R" -print 2>&1 | grep "Permission denied" -v
.pub
and string rsa
in the file name on the
entire machine:
where "*.R" can be of course any other pattern to match the file
names you are looking for. The pipe serves the purpose to suppress
all those error messages where you don't have permission to read
in the directory, e.g. if you search from the root, i.e. everywhere,
this is likely to generate lots of output of little interest. Should
you really wish to search really everywhere, you need to use
( find / -name "*.pub" -print | xargs grep -nl "rsa" ) 2> /dev/null
sudo
.
To find a file by its inode, e.g. when having repaired a disk using
fsck
or application "Disk Utility" (in Mac OS X
from folder "/Applications/Utilities/"):
It may then be useful to cross-check the found files by using
a command similar to the following:
find / -inum 160014 2>&1 | grep -v "Permission denied"
which returns the inode number.
stat -f "%i" "/Volumes/HD/uaf/Documents/SysInfos/SysInfos-Install Logs o/Disk Reports/DiskUsage Cube 2008.08.15.xls"
To search for applications or commands it is easier to use commands like
which
and whereis
.
% ftp -n
ftp> open baikal.ethz.ch <- or whichever remote host you wanna connect to
Connected to baikal.ethz.ch.
220 baikal FTP server (Version 6.9 Fri Feb 5 17:31:11 MET 1993) ready.
ftp> user amueller <- or whoever user you wanna login as
331 Password required for amueller.
Password: <- enter your password as requested
230 User amueller logged in.
ftp> cd forclim
...
Here you can use commands like cd, ls etc. to
navigate on the machine to which you are connected. To actually
transfer files use get or put. With put
files will arrive, with get
files will come from the
current working directory. To access other files preceed them with
a path relative to the current working directory. To terminate a
ftp session use close
to disconnect from the remote
host and/or quit
to leave the entire ftp session.
Unix to Unix ftp works fine with all types of files, however, note, permissions are not transferred and need to be set anew on the target machine. Transfer from/to PCs depends on the software used. IBM PC machines or Macintosh ftp servers tend to behave too intelligently and change file contents. Be careful and make sure ftp parameters are set as you really want them, or files contents may get corrupted. This link contains lots of useful information when working with our main file server, i.e. atlantis.ethz.ch.
See also sftp
and
scp
for alternatives to ftp (more
secure!)
scp
while logged in by a ssh
conncetion.
This is more secure than ftp
and highly recommended.
E.g. you wish to transfer an entire directory named 'FC' from your
OS X Mac (IP-name semac01.ethz.ch) into the current working
directory on the Sun (e.g. huron.ethz.ch). Start typing
% scp -r semac01:
and drag-drop with the
mouse the directory FC right after the typed column.
The command line should look similar to this
% scp -r semac01:/Volumes/HD2/Sim/RMS/Work/FC
Finally type a blank and a period for the current directory:
% scp -r semac01:/Volumes/HD2/Sim/RMS/Work/FC .
Then the command line is complete and you can hit return.
Note, in this example the full path and file name for
the directory on your Mac was /HD2/Sim/RMS/Work/FC/
.
If you wish to transfer an individual file, do the same but omit
the option -r
.
If you wish to have another destination on the Sun where you wish to have the file(s)
copied, type the path to this destination instead of the period. Ex.:
% scp ~/RCtool_Read_Me-2.3.pdf w3_sysecol2@sysecol2.ethz.ch:htdocs/software/RCtool/pdfs/
Note, you may also be prompted for your own password on your own Mac
and need to accept the key when asked. In case your user name
on the Sun and the Mac differ, you need to specify the user
name on your Mac as in the following example:
% scp afischli@semac01:/Volumes/HD2/Sim/RMS/Work/ForClim.SUP .
In case the two hosts are not on the same local area network,
you may need also to give the full IP-name of your source machine.
Ex.:
% scp afischli@semac01.ethz.ch:/Volumes/HD2/Sim/RMS/Work/ForClim.SUP .
see also OS X Hint and Example syntax for Secure Copy (scp)
sftp
is the recommended alternative to
ftp
and you can use it whenever you have ssh access to a host. Ex.:
afischli$ sftp atitlan <- or whichever remote host you wanna connect to
Connecting to atitlan...
|-----------------------------------------------------------------|
| This system is for the use of authorized users only. |
...
snip
...
| evidence of such monitoring to law enforcement officials. |
|-----------------------------------------------------------------|
afischli@atitlan's password: <- enter your password as requested
sftp> pwd
Remote working directory: /home/afischli
sftp> cd /export/ftp/pub/docs/afischli/for-annett
sftp> lcd /Users/afischli/Desktop
sftp> put Fischlin-ForstKolloq.-Jan_08.pdf
Uploading Fischlin-ForstKolloq.-Jan_08.pdf to /export/ftp/pub/docs/afischli/for-annett/Fischlin-ForstKolloq.-Jan_08.pdf
Fischlin-ForstKolloq.-Jan_08.pdf 100% 113KB 113.0KB/s 00:00
sftp> ls
Fischlin-ForstKolloq.-Jan_08.pdf
sftp> quit
afischli$
...
Here you can use commands like cd, ls, put,
and get, quit, and help etc. very similar to
the ones you are used using with ftp. Above example transfers with
the basic command put
a pdf file to the host. The
host serves as an anonymous ftp server and can thus offer large
files to recipients. Note, large files (rule of thumb: >1MB)
should not be attached to E-mails. Uploading them to a ftp server
allows you to "send" such files nevertheless.
OS X Hint: If you are using Apple's Terminal application you
can drag and drop any object from the Finder to the the Terminal's
window. Thus type e.g.
put <blank>and then drag drop any file to the Terminal window. The result should be similar to this put /Users/afischli/Desktop/Fischlin-ForstKolloq.-Jan_08.pdfand only then press the <return> key. Remember, with Apple's Terminal there is little need to assemble complicated path names if you see your files or directories of interest already in the Finder. |
On inawa and okee we have installed GNU C compilers. First basic help on okee type:
given MANPATH contains path/usr/local/bin/gcc --help
orman gcc
/usr/local/man
.
On inawa gcc
is too old to accept the
--help
option.
However man gcc
is fine.
Archive entire branch of your filesystem, e.g. directory
RASSDev
into a new tar archive
% tar cvf RASSDev.tar RASSDev
Generates in file RASSDev.tar
all files and subdirectories contained
in directory RASSDev
.
Inspect a tar archive with
% tar tvf RASSDev.tar | more
Add some more files from your filesystem, e.g. a directory
RASSDev/ISIS
into an existing tar archive
(RASSDev.tar
)
% tar rvf RASSDev.tar RASSDev/ISIS
Extract a tar archive into its original branch of your filesystem
% tar xvf RASSDev.tar
Better is to restore also exactly all permissions with
% tar xvfp RASSDev.tar
(Note: Works fine if you own all files, otherwise you
should be superuser to set all owners to the original
values)
Extract a single file
Using tar with extended attributes may cause difficulties. To make
a clean tar file without extended attributes of the directory
"my_files", do the following:
Move an entire branch of your filesystem by means of
However, often
On the host huron.ethz.ch we have installed the
apache web server.
As an ordinary user you may offer web pages in the folder
You can control the access to your web pages. For instance
you may require a visitor to login and enter a password before
the visitor may access your web pages. If your home directory
contains a hidden file To give some visitors access to your restriced web pages,
you have to specify the visitor's name and a password.
On the Mac use
% tar xvf RASSDev.tar
e.g.: tar xvf RASSDev303.tar RASSDev303/a.RassTests.Diff
suntar
or Stuffit Deluxe to deal with tar archives
(or use Terminal when you are working under OS X).
# copy my_files to the Desktop, excluding extended attributes
cp -rX ~/Documents/my_files ~/Desktop/my_files
# go to Desktop
cd ~/Desktop
# create the tar file, excluding .DS_Store files
tar cjvf my_files.tar.bz2 -exclude .DS_Store my_files
# remove the copy
rm -r my_files
tar
.
Example:
To move it to another server supporting % cd fromdir; tar cf - .| (cd todir; tar xfBp -)
rsh
services:
You will of course be prompted for username and password.
% cd fromdir; tar cf - .| rsh hostname cd todir\; tar xvBpf -
Use gzip
or compress
.
E.g. to compress file RASSDev.tar enter:
You should obtain the compressed file % gzip RASSDev.tar
RASSDev.tar.gz
in place of the original file.
Uncompress such a file by
Using % gunzip RASSDev.tar.gz
compress
respectively uncompress
enter e.g.
You should obtain the compressed file % compress RASSDev.tar
RASSDev.tar.Z
.
Uncompress such a file by
and you get back file % uncompress RASSDev.tar.Z
RASSDev.tar
Look at a library archive:
Extract a file:
% ar -t /opt/epc/em2/lib/libSM2_p.a
...
Replace a file:
% ar -x /opt/epc/em2/lib/libSM2_p.a IEEECtrl1.def
...
% ar -r /opt/epc/em2/lib/libSM2_p.a IEEECtrl1.def
...
call it to learn about the current disk space usage. Note, on our
suns are several versions of this program around (e.g. /usr/bin/df,
/usr/sbin/df, /usr/ucb/df, or /bin/df). The one most users seem to like
best, i.e. the winner is: /usr/ucb/df.
Set your paths or an alias (e.g. alias df /usr/ucb/df) accordingly.
Good tutorials:
Awk by example, Part 1
Awk by example, Part 2
Use tr
to translate characters, typically in a pipe. Ex.:
converts the end of line characters used in Mac file
% cat myfile | tr '\015' '\012'
myfile
, i.e. ASCII CR (= octal 15), into the end of
line characters of a Unix file, i.e. ASCII LF (= octal 12).
tr
fails for reasons difficult to
understand, in particular under Mac OS X. You may
encounter this error
Then use command tr: Illegal byte sequence
locale
to learn about your current
language settings. Note that tr
works only as
designed if LCCTYPE=C
. It is best then to override
the global language settings of your computer for the use of
tr
temporarily. Either prefix your tr
command with
in the Bourne or bash shells or use following statement in the C shells:
% cat myfile | LCCTYPE=C tr '\015' '\012'
and % setenv LC_CTYPE C ; cat myfile | tr '\015' '\012'
tr
should again work as expected.
public_html
within your home directory. You may
then access these "user-specific" web pages with the URL
http://huron.ethz.ch/~username
where username
stands for your login
name. Ex.:
http://huron.ethz.ch/~forclim
will access the web pages of the ForClim data base (access
restricted).
.htpasswd
, then the access
is restricted to those users listed in this file.
.htaccess
and add the visitor's UserID
similar to this example:
AuthName "visiting this site as registered user"
AuthUserFile /home/forclim/.htpasswd
Require user myvisitor
In this example the username is myvisitor
.
Note, this name is normally a different one than the
name you use to login to the Unix host.
It is only used to gain access to
particular web pages, i.e. the web pages, which reside inside
public_html
within your own home directory.
The visitor called myvisitor
can visit the
web pages contained in public_html
only
by the proper user name and the correct password (see below).
Note, in this example it ist still the user forclim who owns all html files and
has full control over the access to these files by visitors.
There is no need to ask the system administrator
for further support.
Note also, this method to restrict access is not very safe.
It is called "basic authentication" and provides only a simple
access restriction with no security against
sophisticated hackers
(see also link to apache documentation below).
/usr/apache/bin/htpasswd .htpasswd User IDThe User ID is the same as listed in file
.htacess
(see previous step).
With our installation of apache, you may execute your own
cgi-bin, e.g. a perl script. Our installation requires
that you store such a cgi-bin script
within the directory cgi-bin
inside the
directory public_html
.
More on apache can be found here.
Excellent help information is available here:
Instructions of how to use the software, which provides this service (it's called netatalk) can be found on e.g. inawa. Use Unix command man e.g.
man afpd - AppleTalk Filing Protocol daemon
man atalkd - System administration only
man papd - System administration only
man psf - Printing postscript files via Unix
Back to:
Top of page
Terrestrial Systems Ecology
Environmental Physics (UP)
Institute of Biogeochemistry and Pollutant Dynamics (IBP)
Partner institutes:
Institute for Atmospheric and Climate Science (IAC)
Institute of Integrative Biology (IBZ)
Department of Environmental Systems Science
ETH Zurich
Responsible for content: Andreas Fischlin
or contact Webmaster ( Last modified 10/29/24 )