= 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 'foldername' (after removing its content by 'rm *') 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 like KDE or GNOME) {{{ cd /.fsnet/data/legi/calcul9/home/'login name' }}} == 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/'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') A process with visible window can be also stopped directly by typing 'xkill' in a terminal and pressing the mouse on the window. == 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 == '''Quota for a group'':: {{{ quota -s -g -A }}} The relevant folders must be first activated by a command like {{{cd}}} or {{{ls}}}'''. '''disk space used by folders''' {{{ 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 on the web server (for development of uvmat) == 1. Open a terminal and go to servcalcul3 by ssh (not on bigtwo). 1. 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 }}} 1. compress the folder UVMAT as a zip archive, {{{ zip -r uvmat_toolbox.v'number'.zip UVMAT }}} where 'number' is the version number. 4. transfer the archive to the web site using cadaver (like FTP). {{{ cadaver https://servforge.legi.grenoble-inp.fr/pub/soft-uvmat/ put uvmat_toolbox.v'number'.zip }}} remove older version by command rm . type 'exit' to exit cadaver. For updating the demo files, same procedure but taking the sources from /.fsnet/soft/team-meige/UVMAT/UVMAT_DEMO_SOURCES.