Sponsored Content
Full Discussion: touch and echo
Top Forums Shell Programming and Scripting touch and echo Post 76035 by pascalbout on Friday 24th of June 2005 06:45:25 AM
Old 06-24-2005
touch and echo

hello

what is the difference between :

touch /home/toto
and
> /home/toto

thank you

Last edited by pascalbout; 06-24-2005 at 07:51 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

touch command help

Hi, This might be the stupidest question ever but here it goes, i need to create a file with the name Hello! It's $s It using the touch command but whenever i use touch 'Hello! It's $s' i get s is undefined touch Hello! It's $s i get ' unmatched Please help ^_^ (6 Replies)
Discussion started by: wsn
6 Replies

2. Shell Programming and Scripting

touch

why am i unable to change the timestamp on a file I'm getting the following error on AIX. touch: cannot change times Any help is appreciated. Regards, Ram. (4 Replies)
Discussion started by: ramky79
4 Replies

3. UNIX for Dummies Questions & Answers

Touch all files and subdirectories (recursive touch)

I have a folder with many subdirectories and i need to set the modified date to today for everything in it. Please help, thanks! I tried something i found online, find . -print0 | xargs -r0 touch but I got the error: xargs: illegal option -- r (5 Replies)
Discussion started by: glev2005
5 Replies

4. Shell Programming and Scripting

Difference between using "echo" builtin and /bin/echo

So in my shell i execute: { while true; do echo string; sleep 1; done } | read line This waits one second and returns. But { while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly. I have tried this in bash as well as zsh,... (2 Replies)
Discussion started by: ulidtko
2 Replies

5. UNIX for Dummies Questions & Answers

How to correctly use an echo inside an echo?

Bit of a weird one i suppose, i want to use an echo inside an echo... For example... i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos... echo "echo "hello"" >$file echo "echo "goodbye"" >$file ... (3 Replies)
Discussion started by: mokachoka
3 Replies

6. Shell Programming and Scripting

touch help

I need to change the modified time to below time , but can't get through using touch Nov 27 10:16 (2 Replies)
Discussion started by: dinjo_jo
2 Replies

7. UNIX for Dummies Questions & Answers

touch command

Is there a way to do... touch ./config/newdir/newfile if neither newdir and newfile exists? man touch tells me there's not (?) Is out there another tool to do that? Thx in advance! :b: (6 Replies)
Discussion started by: funyotros
6 Replies

8. Shell Programming and Scripting

With that logic this echoes "echo". Question about echo!

echo `echo ` doesn't echoes anything. And it's logic. But echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo" (too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies

9. Shell Programming and Scripting

Help on touch command

Hi all I changed some of my files in my hoem directory to old dates using the touch command like this touch -t 200805101024 file name but after using this command the date changed properly but it displays like below -rwxr--r-- 1 fincntrg fingrp 193619 May 10 2008 vi.pdf I... (3 Replies)
Discussion started by: thelakbe
3 Replies

10. UNIX for Dummies Questions & Answers

Touch Challenge

I've been given a directory full of subdirectories full of logfiles of the same name: /logfiles/day1/file1/blockednodes.csv day1-14 file1-48 The above is the actual directory structure for 14 days worth of a logfile that is generated every 30 minutes. It's been done this way to preserve the... (15 Replies)
Discussion started by: Cludgie
15 Replies
oarsub(1)							   OAR commands 							 oarsub(1)

NAME
oarsub - OAR batch scheduler job submission command. SYNOPSIS
oarsub [OPTIONS] <job executable> oarsub [OPTIONS] -I oarsub [OPTIONS] -C <JOB ID> DESCRIPTION
One uses oarsub to submit a job to the OAR batch scheduler managing the resources of a HPC Cluster. A job is defined by the description of a set of resources needed to execute a task and a script or executable to run. A job may also be run interactively, and one may also use oarsub to connect to a previously submitted job. The scheduler is in charge of providing a set of resources matching the oarsub command request. Once scheduled and then launched, a job consists of one process executed on the first node of the resources it was attibuted, with a set of environment variables that define the resources which are at the job disposal. That means that the job's executable is responsible for connecting those resources and dispatching the tasks. OPTIONS
-I, --interactive Request an interactive job. Open a login shell on the first node of the reservation instead of running a script. -C, --connect <JOB ID> Connect to a running job. -l, --resource <LIST> Set the requested resources for the job. The different parameters are resource properties registered in OAR database, and `walltime' which specifies the duration before the job must be automatically terminated if still running. Walltime format is [hour:mn:sec|hour:mn|hour]. Ex: nodes=4/cpu=1,walltime=2:00:00 You can specify multiple -l options at the same line. This tells OAR that this is a moldable job so it can take different shapes. For example if you have an application that is very scalable: oarsub -l cpu=2,walltime=20:00:00 -l cpu=4,walltime=10:00:00 -l cpu=8,walltime=5:00:00 ./script.sh OAR will schedule one of these three resource definitions (depending of the current load of the cluster). --array <NUMBER> Submit an array job containing "NUMBER" subjobs. All the subjobs share the same array_id but each subjob is independent and has its own job_id. All the subjobs have the same characteristics (script, requirements) and can be identified by an environment variable $OAR_ARRAY_INDEX. Array jobs can neither be Interactive (-I) nor a reservation (-r). --array-param-file <FILE> Submit a parametric array job. Each non-empty line of "FILE" defines the parameters for the submition of new subjob. All the subjobs have the same characteristics (script, requirements) and can be identified by an environment variable $OAR_ARRAY_INDEX. '#' is the comment sign. Parametric array jobs can neither be Interactive (-I) nor a reservation (-r). -S, --scanscript Batch mode only: ask oarsub to scan the given script for OAR directives (#OAR -l ...) -q, --queue <QUEUE> Set the the queue to submit the job to. -p, --property "<LIST>" Add a list of constraints to properties for the job. The format of a contraint is the one of a WHERE clause using the SQL syntax. -r, --reservation <DATE> Request that the job starts at a specified time. A job creation using this option is called a reservation and instead of a submission. --checkpoint <DELAY> Enable the checkpointing mechanism for the job. A signal will be sent DELAY seconds before the walltime to the first processus of the job (on the first node of the resources). --signal <#SIG> Specify the signal to use when checkpointing. Use signal numbers (see kill -l), default is 12 (SIGUSR2). -t, --type <TYPE> Specify a specific type (besteffort, timesharing, idempotent, cosystem, deploy, container, inner, token:xxx=yy) Note: a job with a type of idempotent will be automatically resubmitted if its exit code is 99. -d, --directory <DIR> Specify the directory where to launch the command (default is current directory) --project <TXT> Specify a name of a project the job belongs to. -n, --name <TXT> Specify an arbitrary name for the job. -a, --anterior <OAR JOB ID> Previously submitted job that this new job execution must depend on. The new job will only start upon the end of the previous one. --notify <TXT> Specify a notification method (mail or command to execute). Ex: --notify "mail:name@domain.com" --notify "exec:/path/to/script args" args are job_id,job_name,TAG,comment TAG can be: - RUNNING : when the job is launched - END : when the job is finished normally - ERROR : when the job is finished abnormally - INFO : used when oardel is called on the job - SUSPENDED : when the job is suspended - RESUMING : when the job is resumed --resubmit <OAR JOB ID> Resubmit the given job as a new one. -k, --use-job-key Activate the job-key mechanism. A job-key will be generated allowing to connect the job from outside the set of resources managed by OAR. The job-key mechanism may be activated by default in your OAR environment. In this case this option is useless. -i, --import-job-key-from-file Import the job-key to use from existing files (public and private key files) instead of generating a new one. One may also use the OAR_JOB_KEY_FILE environment variable. --import-job-key-inline Import the job-key to use inline instead of generating a new one. -e, --export-job-key-to-file Export the the job key to a file. Warning: the file will be overwritten if it already exists. (the %jobid% pattern is automatically replaced) -O <FILE> Specify the files that will store the standard output stream of the job. The %jobid% pattern is automatically replaced. -E <FILE> Specify the files that will store the standard error stream of the job. The %jobid% pattern is automatically replaced. --hold Set the job state into Hold instead of Waiting, so that it is not scheduled (you must run oarresume to turn it into the Waiting state). -D, --dumper Print result in Perl Data::Dumper format. -X, --xml Print result in XML format. -Y, --yaml Print result in YAML format. -J, --json Print result in JSON format. -h, --help Print this help message. -V, --version Print the version of OAR. ENVIRONMENT
OAR_FILE_NODES aka OAR_NODE_FILE aka OAR_NODEFILE Pathname to the file containing the list of the nodes that are allocated to the job. OAR_JOB_NAME Name of the job as given using the -n option. OAR_JOB_ID aka OAR_JOBID Id of the job. Each job get a unique job identifier. This identifier can be use to retrieve information about the job using oarstat, or to connect to a running job using oarsub -C or oarsh for instance. OAR_ARRAY_ID aka OAR_ARRAYID Array Id of the job. Each array job get an unique array identifier that is shared by all the subjobs of the array job. This identifier can be used to identify the different subjobs pertaining to a same array job. It can also be used to deal with all the subjobs of a given array at once (by means of the option --array in the case of oarstat, oarhold, oarresume and oardel). By definition, single jobs are considered array jobs with only one subjob. OAR_JOB_INDEX aka OAR_JOBINDEX Array Index of the job. On an array job, each job get an unique an unique (on a given array) job index. This identifier can be used to differ jobs on the context of a given array, for instance to give a different behaviour to each of the subjobs. By definition, single jobs are considered array jobs with only one subjob, having OAR_JOB_INDEX = 0. OAR_JOB_WALLTIME resp. OAR_JOB_WALLTIME_SECONDS Walltime of the job in the hh:mm:ss format resp. in seconds. OAR_RESOURCE_PROPERTIES_FILE Pathname to the file containing the list of all resources attributes for the job, and their value OAR_PROJECT_NAME Name of the project the job is part of, as given using the --project option. OAR_STDOUT and OAR_STDERR Pathname to the files storing the standard output and error of the job's executable when not running in interactive mode. OAR_WORKING_DIRECTORY aka OAR_WORKDIR aka OAR_O_WORKDIR Working directory for the job. The job executable will be executed in this directory on the first node allocated to the job. OAR_JOB_KEY_FILE Key file to use for the submission (or for oarsh) if using a job key (-k or --use-job-key option). One may provide the job key to import using the -i or --import-job-key-from-file option as well. SCRIPT
Script can contain the description of the job. Lines with options must begin by the key #OAR. There are the same options as previous. EXAMPLES
Job submission with arguments : oarsub -l /nodes=4 -I oarsub -q default -l /nodes=10/cpu=3,walltime=50:30:00 -p "switch = 'sw1'" /home/users/toto/prog oarsub -r "2009-04-27 11:00:00" -l /nodes=12/cpu=2 oarsub -C 154 Submit an array job with 10 identic subjobs: oarsub -l /nodes=4 /home/users/toto/prog --array 10 Submit a parametric array job (file params.txt): oarsub /home/users/toto/prog --array-param-file /home/users/toto/params.txt Parameter File example (params.txt): # my param file =item #single param =item 100 =item #a subjob without parameters =item "" =item #a subjob with a string containing spaces as parameter =item "arg1a arg1b arg1c" "arg2a arg2b" Script example (file /home/users/toto/script.sh): #!/bin/bash #OAR -l /nodes=4/cpu=1,walltime=3:15:00 #OAR -p switch = 'sw3' or switch = 'sw5' #OAR -t besteffort #OAR -t type2 #OAR -k #OAR -e /path/to/job/key #OAR --stdout stdoutfile.log /home/users/toto/prog Submit the script : oarsub -S /home/users/toto/script.sh SEE ALSO
oarsh(1), oardel(1), oarstat(1), oarnodes(1), oarhold(1), oarresume(1) COPYRIGHTS
Copyright X 2008 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU Library General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. oarsub 2012-05-23 oarsub(1)
All times are GMT -4. The time now is 03:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy