![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SED command is not executing within the shell | naushad | UNIX for Dummies Questions & Answers | 1 | 03-26-2008 04:35 AM |
| Remotely executing awk command | bishweshwar | Shell Programming and Scripting | 1 | 07-14-2007 05:20 PM |
| Executing a unix command | jacob23 | UNIX for Dummies Questions & Answers | 5 | 12-20-2006 10:36 PM |
| executing the su command from a script. | shailendrat | Shell Programming and Scripting | 6 | 04-11-2005 01:44 AM |
| Automatically executing a command | robbiegregg | UNIX for Dummies Questions & Answers | 8 | 04-06-2005 11:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
executing dir or ls command via FTP
Hi,
I need to get latest *.txt file from windows server via executing FTP command from Unix box. So I decided to get the list of files first and then get only the latest. When I execute "ls *.txt" command and redirect list of files to a local file, it works fine. As soon as I add parameter "ls -t *.txt" it stops working and doesn't populate local file with list of files on Windows server. Same happens when I try to execute "dir *.txt" - works fine, as soon as I added "dir /O-d *.txt" - trying to sort files and create list in sorted order it stops working. What am I doing wrong ? -Thank you. |
|
||||
|
ftpd - the process on the remote box that allows an ftp transfer - does not support
options. While in ftp try Code:
help site or help quote The simplest way is to get all the "*.txt" files, then do a diff on the new ones to see if they are indeed different from the old ones (that are in another directory so they are not overwritten). Samba will remote mount disks on a windows server for you as well. |
|
||||
|
I have also tried to populate list without any option and it gives me this list:
-rwxrwxrwx 1 owner group 9538 Jan 13 16:23 ALX_TEST.txt -rwxrwxrwx 1 owner group 4 Jan 26 14:19ALX_TEST_LATEST.txt -rwxrwxrwx 1 owner group 9538 Nov 17 2005 TestACH.txt Now I can use awk and print commands to get the date and time part...but I don't see any date functions that would allow me to convert string "Jan 13 12:23" into date and be able to compare with date of another file... any thoughts on that ? -thanks |
|
||||
|
Jim,
I have created get_list.bat file ftp'd it over to the remote directory on windows, then issued separate ftp command and tried to run this get_list.bat file. I was getting "invalid command" error message. Have you done execution of a *.bat command on a remote server before ? thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|