Sponsored Content
Top Forums Shell Programming and Scripting Need to create automated Directories Post 302913103 by Chubler_XL on Wednesday 13th of August 2014 05:13:01 PM
Old 08-13-2014
You could add the --progress and --stats options for a bit more viability on what is going on:

Code:
rsync -av --include='*/' --exclude='*' --progress --stats /opt/app/Output/ ServerB:/opt/app/Output/

This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to create directories

Hi... Can any1 help me by telling me the way to create multiple directories using single command.... to create 1 directory.. mkdir is used.... :D but how to create multiple direcs. like 4 direc. i tried .... $ mkdir a; mkdir b; mkdir c; mkdir d But its 4 commands in a single... (3 Replies)
Discussion started by: abishekmag
3 Replies

2. UNIX for Dummies Questions & Answers

Create directories with regular expression

Hi guys, can any one tell me how to create directories using regular expression? Let's say that I need to create directories test01, test02, test03.... test10. Can it be done using any regular expression? thanks. (13 Replies)
Discussion started by: mahendrt
13 Replies

3. UNIX for Dummies Questions & Answers

How to create shotcuts to the directories

Hi, I need your help in writing shortcuts to my directories. So that I can go into the directories with the help of shortcuts. For example: there is a directory called /home/java/webapps/project1 I want to give a shortcut as project1 . So whenever I have give cd project 1 from command line ... (3 Replies)
Discussion started by: TonySolarisAdmi
3 Replies

4. UNIX for Dummies Questions & Answers

Want to create 3 different new directories under the same path

Hi, Iam new to UNIX...My requirement is to create 3 dir as an hierarchy under /var/opt/temip.The output should be /var/opt/temip/GP_Int/GPTTS/AUTO. I have tried the following script...But only GP_int folder is getting created and not other folders...Can someone help??? #!/usr/bin/ksh #script... (1 Reply)
Discussion started by: Llb
1 Replies

5. UNIX for Dummies Questions & Answers

Create zip without including directories

Hi guys, I'm trying to do the following: zip -r /tmp/foo.zip public/accounts/foo But the zip that's been made has the whole "public/accounts/foo" path. I want only the foo folder to be zipped. How can I do this? Thanks, Elías (2 Replies)
Discussion started by: elioncho
2 Replies

6. Shell Programming and Scripting

check if multiple directories exist else create missing directories

Hi , I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory. how to write this in a simple script, I have made my code complex if ; then taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies

7. Shell Programming and Scripting

Write an automated shell program(s) that can create, monitor the log files and report the issues for

Hi , Please help me getting this done. Write an automated shell program(s) that can create, monitor the log files and report the issues for matching pattern. (i) Conditions for creating log files. Log file is created with date (example 2010_03_27.log). If the log file size is 10 Mb for... (1 Reply)
Discussion started by: itian2010
1 Replies

8. Ubuntu

Create a customized ubunto automated installtion cd

Hi 1- I want to create a cd or dvd of ubunto , that include a lot of installed packages entered by me . 2- automated installion (just enter the cd )and install by it self . (3 Replies)
Discussion started by: rashed
3 Replies

9. UNIX for Dummies Questions & Answers

Create 2 directories in one command

Hi how can i create 2 directories in two different directories ($HOME and $PWD) with 1 command? dir 1 in $HOME and dir2 in $PWD (2 Replies)
Discussion started by: chinababy
2 Replies

10. Shell Programming and Scripting

Create automated scan of specific directory using bash

I am trying to use bash to automate the scan of a specific directory using clamav. Having this in place is a network requirement. The below is an attempt to: 1. count the extensions (.txt, .jpeg) in a directory and write them to a virus-scan.log (section in bold) 2. scan each folder in the... (6 Replies)
Discussion started by: cmccabe
6 Replies
TIMELIMIT(1)						    BSD General Commands Manual 					      TIMELIMIT(1)

NAME
timelimit -- effectively limit the absolute execution time of a process SYNOPSIS
timelimit [-pq] [-S killsig] [-s warnsig] [-T killtime] [-t warntime] command [arguments ...] DESCRIPTION
The timelimit utility executes a given command with the supplied arguments and terminates the spawned process after a given time with a given signal. If the process exits before the time limit has elapsed, timelimit will silently exit, too. Options: -p If the child process is terminated by a signal, timelimit propagates this condition, i.e. sends the same signal to itself. This allows the program executing timelimit to determine whether the child process was terminated by a signal or actually exited with an exit code larger than 128. -q Quiet operation - timelimit does not output diagnostic messages about signals sent to the child process. -S killsig Specify the number of the signal to be sent to the process killtime seconds after warntime has expired. Defaults to 9 (SIGKILL). -s warnsig Specify the number of the signal to be sent to the process warntime seconds after it has been started. Defaults to 15 (SIGTERM). -T killtime Specify the maximum execution time of the process before sending killsig after warnsig has been sent. Defaults to 120 seconds. -t warntime Specify the maximum execution time of the process in seconds before sending warnsig. Defaults to 3600 seconds. On systems that support the setitimer(2) system call, the warntime and killtime values may be specified in fractional seconds with microsec- ond precision. ENVIRONMENT
KILLSIG The killsig to use if the -S option was not specified. KILLTIME The killtime to use if the -T option was not specified. WARNSIG The warnsig to use if the -s option was not specified. WARNTIME The warntime to use if the -t option was not specified. EXIT STATUS
If the child process exits normally, the timelimit utility will pass its exit code on up. If the child process is terminated by a signal and the -p flag was not specified, the timelimit utility's exit status is 128 plus the signal number, similar to sh(1). If the -p flag was spec- ified, the timelimit utility will raise the signal itself so that its own parent process may in turn reliably distinguish between a signal and a larger than 128 exit code. In rare cases, the timelimit utility may encounter a system or user error; then, its exit status is one of the standard sysexits(3) values: EX_USAGE The command-line parameters and options were incorrectly specified. EX_SOFTWARE The timelimit utility itself received an unexpected signal while waiting for the child process to terminate. EX_OSERR The timelimit utility was unable to execute the child process, wait for it to terminate, or examine its exit status. EXAMPLES
The following examples are shown as given to the shell: timelimit -p /usr/local/bin/rsync rsync://some.host/dir /opt/mirror Run the rsync program to mirror a WWW or FTP site and kill it if it runs longer than 1 hour (that is 3600 seconds) with SIGTERM. If the rsync process does not exit after receiving the SIGTERM, timelimit issues a SIGKILL 120 seconds after the SIGTERM. If the rsync process is terminated by a signal, timelimit will itself raise this signal. tcpserver 0 8888 timelimit -t600 -T300 /opt/services/chat/stats Start a tcpserver(n) process listening on tcp port 8888; each client connection shall invoke an instance of an IRC statistics tool under /opt/services/chat and kill it after 600 seconds have elapsed. If the stats process is still running after the SIGTERM, it will be killed by a SIGKILL sent 300 seconds later. env WARNTIME=4.99 WARNSIG=1 KILLTIME=1.000001 timelimit sh stats.sh Start a shell script and kill it with a SIGHUP in a little under 5 seconds. If the shell gets stuck and does not respond to the SIGHUP, kill it with the default SIGKILL just a bit over a second afterwards. SEE ALSO
kill(1), rsync(1), signal(3), tcpserver(n) STANDARDS
No standards documentation was harmed in the process of creating timelimit. BUGS
Please report any bugs in timelimit to the author. AUTHOR
The timelimit utility was conceived and written by Peter Pentchev <roam@ringlet.net> with contributions and suggestions by Karsten W Rohrbach <karsten@rohrbach.de>, Teddy Hogeborn <teddy@fukt.bsnet.se>, and Tomasz Nowak <nowak2000@poczta.onet.pl>. BSD
September 29, 2010 BSD
All times are GMT -4. The time now is 05:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy