Version 12 (modified by 10 years ago) (diff) | ,
---|
CoriolisUnixCommand - UNIX Command
Basic operations
- to list content of the current folder: 'ls'. 'ls -al' to get more information.
- to change name: mv 'old' 'new'
- to delete: rm 'filename'
- to delete folder: rmdir rm 'foldername'
Use 'Table' key to complement any input command.
Moving among folders
cd 'absolute folder name' or relative name inside the current folder'
To go up:
cd ..
To go home
cd ~
To go to your home on the LEGI computer server (can be reached also by the Window system)
cd /.fsnet/data/legi/calcul9/home/sommeria
Moving to the LEGI computer server servcalcul3 by ssh
ssh -CX servcalcul
(-CX to allow graphic display for instance with Matlab) To reach your computer home from servcalcul3:
/.fsnet/data/team-meige/coriolis-home/'your login name'
List running processes
ps
Use a pipe grep (|grep
) to select users or processes names.
Useful options :
- a : all processes, not only current user's process
- u : sorted by user
- f : show arborescence
exemple ci-dessous : ps fau | grep matlab
gostiaux@eres0vmbig2:/.fsnet/data/eres/coriolis-home/gostiaux$ ps fau |grep matlab mathur2m 29190 0.4 2.8 1239856 411264 pts/3 Sl+ Mar04 20:54 \_ /opt/matlab/R2009b/bin/glnxa64/MATLAB -r uvmat mathur2m 21961 1.5 3.3 1302644 486148 pts/24 Sl+ Mar04 55:18 \_ /opt/matlab/R2009b/bin/glnxa64/MATLAB -r uvmat mathur2m 22769 0.0 0.0 13708 980 pts/25 Ss+ Mar04 0:00 \_ /opt/matlab/R2009b/bin/glnxa64/matlab_helper /dev/pts/25 yes gostiaux 10901 0.0 0.0 9544 840 pts/15 S+ 11:36 0:00 \_ grep matlab viboud 26714 0.0 1.9 1147184 292264 pts/0 Sl+ Mar04 3:40 \_ /opt/matlab/R2009b/bin/glnxa64/MATLAB -r uvmat sommeria 4098 0.9 2.9 1218768 436936 pts/10 Sl+ 07:44 2:06 \_ /opt/matlab/R2009b/bin/glnxa64/MATLAB
List process with a given processname (list of PID numbers): ps -u 'username' | grep processname
(|grep
detects a string in any display)
kill process
kill 'number PID' or stronger 'kill -9 'numero PID'
(case of thunderbird: need also to suppress lock files, use command 'rmLock')
Synchronisation of files
rsync -a rep1 rep2/
(be careful with / , synchronise the directory "rep1" with rep1 existing in rep2 ;)
Change file access properties
- examples (can be performed only by the file owner):
- change all png files to read-only in the current directory:
chmod ugo-w *.png
- provide writing access for your group to a directory dirname (or to a file):
chmod ugo+ws dirname
Monitor disk space
df -a
gives all the partitions and their status
du --max-depth=2 -h
browse recursively a folder, and gives the space of each block
example :
gostiaux@eres0vmbig2:/fsnet/project/coriolis/2011$ du --max-depth=1 -h 0 ./lost+found 556G ./11KUROSHIOMANI 337G ./11BORDES 625G ./11TRANSTEK 1,5T
Monitor users
List potentially connected users
ps faux | cut -f 1 -d ' ' | sort | uniq
loading the source of uvmat as zip file on the web server
- Open a terminal and go to servcalcul3 by ssh (not on bigtwo).
- Get an updated version of uvmat from the svn server by typing:
svn checkout http://servforge.legi.grenoble-inp.fr/svn/soft-uvmat/trunk/src UVMAT
- compress the folder UVMAT as a zip archive,
zip -r uvmat.v.'number'.zip UVMAT
where 'number' is the version number.
- transfer the archive to the web site using cadaver (like FTP).
cadaver https://servforge.legi.grenoble-inp.fr/pub/soft-uvmat/ put uvmat.v.'number'.zip
remove older version by command rm . type 'exit' to exit cadaver.