Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using tar to move directories Post 302823443 by vbe on Wednesday 19th of June 2013 10:05:27 AM
Old 06-19-2013
Thats not so old so all should work... I was expecting aix 4.3 ( I still have a few 4.2.1 boxes running with no hope of migration... they will die when new applications will be finished..)

The ksh has not the same behaviour. in 7.1... You may need to modify some scripts ( I cant rememeber now what it was...) it has to do with test conditions and the man page of aix was of no help... ( I migrated last year server from 6.1 to 7.1 and had some scripts failing...)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Compare directories then move similar ones

I would like to know how to compare a listing of directories that begin with the same four numbers ie. /1234cat /1234tree /1234fish and move all these directories into one directory Thanks in advance (2 Replies)
Discussion started by: tgibson2
2 Replies

2. UNIX for Dummies Questions & Answers

Tar only the Directories and Sub Directories

Hi all, I want to only tar the Directories and the Sub Directories. I dont want the files which are created in those directories. Can you please help me out in this issue. Regards Andy (3 Replies)
Discussion started by: Andysundar
3 Replies

3. UNIX for Dummies Questions & Answers

tar, zip multiple separate directories and move the results to another volume

TIA, I'm using FreeBSD 6 I have a series of Directories (A,B,C,...Z). Each directory has files and other directories within it. I want to compress the contents of each top directory into a single file so that I get an archive of each directory (for example, A.gzip) AND and want to move... (5 Replies)
Discussion started by: jccbin
5 Replies

4. Shell Programming and Scripting

Loop to move files in different directories

Hi, I have various log files in different paths. e.g. a/b/c/d/e/server.log a/b/c/d/f/server.log a/b/c/d/g/server.log a/b/c/h/e/server.log a/b/c/h/f/server.log a/b/c/h/g/server.log a/b/c/i/e/server.log a/b/c/i/e/server.log a/b/c/i/e/server.log and above these have an archive folder... (6 Replies)
Discussion started by: acc01
6 Replies

5. UNIX Desktop Questions & Answers

Help with Script to Move Directories

Hi I am after a simple script to move folders/files from one directory into another directory on the same server. I want to run a cron so this can run at midnight. Issue is there will not always be data in the source folder. This script works fine but it errors if nothing exists in the source... (3 Replies)
Discussion started by: treds
3 Replies

6. Shell Programming and Scripting

move directories up one level

hi , could you help me with shell scripting in a shell script i have these commands a=`ls -R $dir | grep ./ ` cp -R ./$a/* ./$output/ with the first command i have all the directories with the second command i want to copy them in a new directory something like this... (2 Replies)
Discussion started by: faethon
2 Replies

7. UNIX for Advanced & Expert Users

Move files while making a tar

I have the following folder structure code/f1/ code/lib/t1 code/lib/t2 code/lib/t3 code/lib/t3 code/lib_1/t1 code/exc I would like to create a tar with a folder structure below and I can use the following tar command f1 lib/t1 lib/t2 lib/t3 tar -cvf code.tar -C code f1 lib... (4 Replies)
Discussion started by: alpboys
4 Replies

8. UNIX for Dummies Questions & Answers

Move multipe files to corresponding directories

Hi, In a parent directory there are several files in the form IDENTIFIER1x IDENTIFIER1.yyy IDENTIFIER1_Z, etc IDENTIFIER2x IDENTIFIER2.yyy IDENTIFIER2_Z, etc IDENTIFIER3x IDENTIFIER3.yyy, IDENTIFIER3_Z, etcIn the same parent directory there are corresponding directories named... (7 Replies)
Discussion started by: spirospap
7 Replies

9. Shell Programming and Scripting

Move directories in script.sh doesn't work

Dear All, I would like move some directories in another location. Basically, my ls -lis drwxr-xr-x 3 XXXXXXXXXXXXXXXXXXXX 4096 Feb 24 02:18 data.N701_N502.ABCDE -rw-r--r-- 1 XXXXXXXXXXXXXXXXXXXX 185865797 Feb 23 11:27 data.N701_N502.ABCDE_file1 -rw-r--r-- 1 XXXXXXXXXXXXXXXXXXXX... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies

10. UNIX for Beginners Questions & Answers

Move several files into specific directories with a loop

Hello, I'm a first time poster looking for help in scripting a task in my daily routine. I am new in unix but i am attracted to its use as a mac user. Bear with me... I have several files (20) that I manually drag via the mouse into several named directories over a network. I've used rsync... (14 Replies)
Discussion started by: SonnyClark
14 Replies
Net::Daemon::Test(3)                                    User Contributed Perl Documentation                                   Net::Daemon::Test(3)

NAME
Net::Daemon::Test - support functions for testing Net::Daemon servers SYNOPSIS
# This is the server, stored in the file "servertask". # # Create a subclass of Net::Daemon::Test, which in turn is # a subclass of Net::Daemon use Net::Daemon::Test (); package MyDaemon; @MyDaemon::ISA = qw(Net::Daemon::Test); sub Run { # Overwrite this and other methods, as you like. } my $self = Net::Daemon->new(\%attr, @options); eval { $self->Bind() }; if ($@) { die "Server cannot bind: $!"; } eval { $self->Run() }; if ($@) { die "Unexpected server termination: $@"; } # This is the client, the real test script, note we call the # "servertask" file below: # # Call the Child method to spawn a child. Don't forget to use # the timeout option. use Net::Daemon::Test (); my($handle, $port) = eval { Net::Daemon::Test->Child(5, # Number of subtests 'servertask', '--timeout', '20') }; if ($@) { print "not ok 1 $@ "; exit 0; } print "ok 1 "; # Real tests following here ... # Terminate the server $handle->Terminate(); DESCRIPTION
This module is a frame for creating test scripts of Net::Daemon based server packages, preferrably using Test::Harness, but that's your choice. A test consists of two parts: The client part and the server part. The test is executed by the child part which invokes the server part, by spawning a child process and invoking an external Perl script. (Of course we woultn't need this external file with fork(), but that's the best possibility to make the test scripts portable to Windows without requiring threads in the test script.) The server part is a usual Net::Daemon application, for example a script like dbiproxy. The only difference is that it derives from Net::Daemon::Test and not from Net::Daemon, the main difference is that the Bind method attempts to allocate a port automatically. Once a port is allocated, the number is stored in the file "ndtest.prt". After spawning the server process, the child will wait ten seconds (hopefully sufficient) for the creation of ndtest.prt. AVAILABLE METHODS
Server part Options Adds an option --timeout to Net::Daemon: The server's Run method will die after at most 20 seconds. Bind (Instance method) This is mainly the default Bind method, but it attempts to find and allocate a free port in two ways: First of all, it tries to call Bind with port 0, most systems will automatically choose a port in that case. If that seems to fail, ports 30000-30049 are tried. We hope, one of these will succeed. :-) Run (Instance method) Overwrites the Net::Daemon's method by adding a timeout. sub Run ($) { my $self = shift; $self->Run(); } Client part Child (Class method) Attempts to spawn a server process. The server process is expected to create the file 'ndtest.prt' with the port number. The method returns a process handle and a port number. The process handle offers a method Terminate that may later be used to stop the server process. AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Phone: +49 7123 14887 Email: joe@ispsoft.de All rights reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::Daemon(3), Test::Harness(3) perl v5.12.1 2007-05-23 Net::Daemon::Test(3)
All times are GMT -4. The time now is 12:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy