Sponsored Content
Top Forums Shell Programming and Scripting cygwin and remote find command problem Post 302337723 by nakod1 on Friday 24th of July 2009 06:42:14 PM
Old 07-24-2009
cygwin and remote find command problem

Sir,
I want to get all the files in directory on a remote server which are dated newer than a specified file. I have ssh running and the command I am using is :
for file_name in `ssh userid@IP find "/cygdrive/d/oracle/oradata/db/archive" -newer "1_44.DBF" -name '*.DBF' -type f -print | xargs -r ls -tr`
I am getting the error:
ls: cannot access /cygdrive/d/oracle/oradata/db/archive/1_99.DBF: No such file or directory

In the past I have used a similar statement many times on a local server under many flavours of UNIX and Linux without any problem.


Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying files from a remote server to local system with cygwin

Hi. I'm sorry if I get on people's nerves asking this, but I don't really understand how to do this and unfortunately don't have the time to work through it step by step in books, etc. At University, we have a unix server that hosts our files. we each have a login and password to access it. I... (3 Replies)
Discussion started by: patwa
3 Replies

2. Shell Programming and Scripting

Find command problem

Hi All, I am using following find command to delete the records older than 7 days but getting missing conjuction error.Kindly suggest: The command is: find <complete_dir_path> \(! -name usr -prune \) -type f -name "*.txt" -mtime +6 -print | xargs rm (11 Replies)
Discussion started by: visingha
11 Replies

3. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

4. Solaris

Cygwin/X Remote connection frozen display problem

Hello, We are using Solaris 2.5.1 box. And we are accessing to Solaris from Windows xp using Cygwin/X. The connection establish without any problem and we can use desktop environment. But, sometimes later ( various between 2 minutes to 10 minutes ) Connectted desktop display is frozen. Mouse is... (4 Replies)
Discussion started by: summerboy
4 Replies

5. UNIX for Dummies Questions & Answers

Long listing of files using find command on remote server via SSH

Hi , I am trying to find some files on a remote machine using the find command. >ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt /home/atukuri/abc.txt The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Discussion started by: atukuri
2 Replies

6. UNIX for Dummies Questions & Answers

Problem with Find command

Hi, I have a script below,which reads dates from No_weekandMonthend_dates.txt performs the copy operation. for i in `cat /tmp/No_weekandMonthend_dates.txt` do cd $Gerenimopath/ZH_LP find . -type f -name "$i_*.txt" -exec cp {} /home/gaddamja/TempLocal \; cd... (2 Replies)
Discussion started by: jagadish_gaddam
2 Replies

7. Shell Programming and Scripting

while loop stops after first iteration - remote ssh exit command problem?

I have written the following script to update some Debian boxes. #!/bin/bash mxg_hosts_file="/etc/mxg/ssh-hosts" while read line ; do mxg_host="$(echo ${line} | awk -F":" '{print $1}')" mxg_port="$(echo ${line} | awk -F":" '{print $2}')" echo "Connecting and Upgrading... (3 Replies)
Discussion started by: jelloir
3 Replies

8. UNIX and Linux Applications

problem with find command

Hi All, I want to search only files more than 60 min in particular directory but not in sub directories. with this command i am getting even sub directires also.Please and let me know how to get the files. $i=`find /home/n1013141/vijay -type f -mmin -60`; print $i; ... (6 Replies)
Discussion started by: bhas1285
6 Replies

9. Shell Programming and Scripting

Until string from remote command equals value run remote command

I solved my issue by using the following code #!/bin/bash function GET_STATUS { #values Active Passive Failed ssh -a localhost '/home/user/fakecommand.sh' } STATE="unknown" until ] do echo $STATE sleep 5 STATUS=`GET_STATUS` echo $STATUS | grep Active &&... (1 Reply)
Discussion started by: $scipt_Kid
1 Replies

10. IP Networking

Cygwin remote ssh with key authentication method

Hi experts, I am not sure in which forum to submit this question. If this is not the correct place then please let me know where to submit this thread. My requirement is to invoke windows batch scripts from linux shell script. Hence, I have installed openssh in Cygwin on the windows machine.... (2 Replies)
Discussion started by: ahmedwaseem2000
2 Replies
PGDBF(1)						      General Commands Manual							  PGDBF(1)

NAME
pgdbf - convert XBase / FoxPro tables to PostgreSQL SYNOPSIS
pgdbf [-cCdDeEhqQtTuU] [-m memofile] filename [indexcolumn ...] DESCRIPTION
PgDBF is a program for converting XBase databases - particularly FoxPro tables with memo files - into a format that PostgreSQL can directly import. It's a compact C project with no dependencies other than standard Unix libraries. While the project is relatively tiny and sim- ple, it's also heavily optimized via profiling - routine benchmark were many times faster than with other Open Source programs. In fact, even on slower systems, conversions are typically limited by hard drive speed. Features PgDBF was designed with a few core principles: Simplicity. This code should be understandable by anyone who wants to hack it. Robustness. Every syscall that might possibly fail is checked for success. Speed. PgDBF was born to be the fastest conversion available anywhere. Completeness. It has full support for FoxPro memo files. Portability. PgDBF runs on 32- and 64-bit systems, and both little-endian (eg x86) and big-endian (eg PowerPC) architectures. Performance PgDBF's speed is generally limited by how fast it can read your hard drives. A striped RAID of quick disks can keep PgDBF pretty well fed on a single-processor system. One problem area is with memo files, which may become very internally fragmented as memo fields are created, deleted, and updated. For best results, consider placing the DBF and FPT files on a RAM drive so that there's no seek penalty as there is with spinning hard drives, or using a filesystem such as ZFS that caches aggressively. One particularly fragmented 160MB table with memo fields used to take over three minutes on a FreeBSD UFS2 filesystem. Moving the files to a RAM disk dropped the conversion time to around 1.2 seconds. A certain test table used during development comprises a 280MB DBF file and a 660MB memo file. PgDBF converts this to a 1.3 million row PostgreSQL table in about 11 seconds, or at a rate of almost 120,000 rows per second. OPTIONS
-c Generate a CREATE TABLE statement to make a table with similar datatypes and column names as the DBF file. Default. -C Suppress the CREATE TABLE statement. -d Generate a DROP TABLE statement before the CREATE TABLE statement. This is useful for replacing the contents of a table that already exists in PostgreSQL. Default. -D Suppress the DROP TABLE statement. -e Change the DROP TABLE statement to DROP TABLE IF EXISTS so that newer versions of PostgreSQL (8.2+) will only attempt to drop the table if it's already defined. PostgreSQL will return an error when attempting to drop a table that does not exist unless IF EXISTS is used. Default. -E Do not use the IF EXISTS modifier to DROP TABLE for compatibility with versions of PostgreSQL older than 8.2. -h Print a help message, then exit. -m memofile The name of the associated memo file (if necessary). -q Enclose the name of the table in quotation marks in statements like "CREATE TABLE", "DROP TABLE", and so on. This is useful in cases where the table name is a PostgreSQL reserved word, and almost certainly harmless in all other cases. -Q Do not enclose the name of the table in quotation marks. Default. -t Wrap the entire script in a transaction. Default. -T Remove the wrapper transaction. This is generally not a good idea as it can cause the table to appear completely empty to other clients during the data copying phase. If the entire process occurs inside a transaction, the update is atomic and other clients will have full access to all data in the table at all times. -u Issue a TRUNCATE TABLE statement to clear the contents of a table before copying data into it. -U Suppress the TRUNCATE TABLE statement. Default. OPTION NOTES
The -c and -d arguments are incompatible with -u as it's pointless to truncate a newly-created table. Specifying -c or -d will disable the TRUNCATE TABLE statement as though -U was given. Similarly, using the -u argument will disable the CREATE TABLE and DROP TABLE statements as if -C and -D were given. BUGS
When multiple incompatible interpretations of a type are available, such as the B type which can mean binary object in dBASE V or double- precision float in FoxPro, PgDBF currently uses the FoxPro interpretation. Most XBase datatypes are supported, but some are not (yet). As of this writing, PgDBF can handle boolean, currency, date, double-precision float, float, general (although only outputs empty strings; it's unclear how to resolve OLE objects at this time), integer, memo, numeric, timestamp, and varchar fields. If you need other datatypes, send a small sample database for testing. AUTHOR
Kirk Strauser <kirk@strauser.com> Version 0.5.5 February 3 2011 PGDBF(1)
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy