The script below is written to ftp files to different directories on the destination server, but I'm not sure whether I have written the code correctly or not.
Can anyone help me on this?
#!/bin/sh
FILE_NAMES="FileA
FileB
FileC"
SERVER=xxxx
USERID=abcd
PASSWD=xxxxx... (12 Replies)
I want to search for a file pattern in more than one directory. How I need to do that?
Here is the scenario:
I am having a directory structure like the following:
/log
...../20051001
..........ftp_server_20051001.log
..........ftp_down_server.log
..........ftp_up_server.log... (7 Replies)
I have a report file that is generated every day by a scheduled process.
Each day the file is written to a directory named .../blah_blah/Y07/MM-DD-YY/reportmmddyy.tab
I want to copy all of this reports to a separate directory without having to do it one by one.
However, if I try
cp... (3 Replies)
Hi,
I need to download multiple files in multiple directores from other Unix server. The files could have been created by differnet user. I can use root account but I want the preserve the owner and time of the remote file. Need help on how I can do this using FTP.
Thanks,
Amit (2 Replies)
I am working on a Korn shell script that will cd into multiple directories that are listed in a flat file and gzip the contents of each directory.
So far, this is what I have:
1) Find the 4 largest directories and place them into the file foo
du -sk /some/directory/* | sort -rn | head -4... (0 Replies)
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
Hi,
Very unfamiliar with unix/linux stuff. Our admin is on vacation so, need help very quickly.
I have directories (eg 40001, 40002, etc) that each have one subdirectory (01).
Each subdir 01 has multiple subdirs (001, 002, 003, etc). They are same in each dir.
I need to keep the top and... (7 Replies)
Hi Experts,
I am in urgent need of your suggestions.
I have below two users in my system:
xyz:x:101:101:XYZ System Account:/export/home/xyz:/bin/bash
abc:x:2009:10:ftp user only:/export/home/abc:/bin/false
Where "xyz" is the crucial one and "abc" is only introduced for FTPing the... (2 Replies)
Hi
I have the following file structure and I want to rename all the abc.jar files to abc_backup.jar
rock@server:~/rakesh> ls -R
.:
test1 test2 test3
./test1:
abc.jar
./test2:
abc.jar
./test3:
abc.jar (2 Replies)
I would like to compress the files in multiple directories. For some reason, it only compress the first directory (/Sanbox/logs1) but not the rest of the other directories ("/Sanbox/logs2" "/Sanbox/logs3" "/Sanbox/logs4" ). Any help would be appreciated. Here's my code:
#!/bin/bash... (1 Reply)
Discussion started by: Loc
1 Replies
LEARN ABOUT SUNOS
dircmp
dircmp(1) User Commands dircmp(1)NAME
dircmp - directory comparison
SYNOPSIS
dircmp [-ds] [-w n] dir1 dir2
DESCRIPTION
The dircmp command examines dir1 and dir2 and generates various tabulated information about the contents of the directories. Listings of
files that are unique to each directory are generated for all the options. If no option is entered, a list is output indicating whether the
file names common to both directories have the same contents.
OPTIONS
The following options are supported:
-d Compares the contents of files with the same name in both directories and output a list telling what must be changed in the two
files to bring them into agreement. The list format is described in diff(1).
-s Suppresses messages about identical files.
-w n Changes the width of the output line to n characters. The default width is 72.
OPERANDS
The following operands are supported:
dir1 A path name of a directory to be compared.
dir2
USAGE
See largefile(5) for the description of the behavior of dircmp when encountering files greater than or equal to 2 Gbyte ( 2**31bytes).
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of dircmp: LC_COLLATE, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred. (Differences in directory contents are not considered errors.)
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO cmp(1), diff(1), attributes(5), environ(5), largefile(5)SunOS 5.10 1 Feb 1995 dircmp(1)