Need year to display from ftped files list


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need year to display from ftped files list
# 1  
Old 03-04-2008
Need year to display from ftped files list

Hi All,


p_ftp=dummy

time ftp -niv 192.0.0.2 << EOF
user dummy dummy
cd prt/$p_ftp
ascii
ls -ltr
quit


output is

-rw-r--r-- 1 500 500 5137 Mar 04 11:21 dummy.csv

can any one suggest how to get year while using ftp


Thanks in advance
# 2  
Old 03-04-2008
I suggest using Perl for this. You can control everything much more than you can with these clumsy redirection and netrc methods.

See Perl Net::FTP for details and sample scripts.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Display lines for a particular year in a file using grep

hi, I have a log file with data for more than 3 years, i want only the rows for the year 2017, say for example. My file has the data like this 08-OCT-2015 11:17:35 AAA, BBBB 08-OCT-2017 11:17:35 AAA,Bdfdfd,dfdfd,dfd 08-Nov-2017 11:17:35 AAA,Bdfdfd,dfdfd,deree i want the rows... (2 Replies)
Discussion started by: skoshekay
2 Replies

2. Red Hat

Oracle Linux issue - all files FTPed to it from windows need to to be processed with dos2UNIX

Hello Friends, I have observed one recent issue about ftp from windows to Linux. Initially we had Solaris unix and any file sent from windows to solaris via ftp (binary or ascii) worked smoothly. Say for e.g if I sent a shell script to soalris from windows, that script used to run corectly.... (17 Replies)
Discussion started by: Albert_Pinto7
17 Replies

3. Shell Programming and Scripting

Merging two year files

Hi All, I need to merge few files as belowABC_NYFWFX.txt ABC_NYFQTFX.txt ABC_NYFMAFX.txt ABC_NYFAVFX.txt ABC_CYFWFX.txt ABC_CYFQTFX.txt ABC_CYFMAFX.txt ABC_CYFAVFX.txt ABC_CYBWFX.txt ABC_NYFWFX.txt & ABC_CYFWFX.txt should be merged into a single file and name should be... (3 Replies)
Discussion started by: Hypesslearner
3 Replies

4. Shell Programming and Scripting

How to list files that are not first two files date & last file date for every month-year?

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies

5. HP-UX

List year for a Folder

Hi, I am trying to list the year for this folder but it does not show. See output: ==> ls -ltrde default drwxr-xr-x 2 bea /tmp 8192 Jul 10 22:56 default Any reasons ? Instead of showing year it shows 22:56. Why ? (1 Reply)
Discussion started by: mohtashims
1 Replies

6. Programming

C++ Display months of year in a double dimensional array

stupid question (0 Replies)
Discussion started by: puttster
0 Replies

7. Shell Programming and Scripting

file FTPed to another destination?

Hi, The scenario which I am describing here is strange but not a product of my imagination! I have a SFTP script which gets file from remote server to a local directory say (/home/dips/ftp/my_files) inside my_files/ there's another sub-dir archive/ The strange scenario is that once... (1 Reply)
Discussion started by: dips_ag
1 Replies

8. Shell Programming and Scripting

List files and display last modify time in a particular format

hi everyone, can someone suggest how i can list the contents of a directory and display their corresponding last modify time in the format yyyymmddhhmm? thanks in advance! (16 Replies)
Discussion started by: Deanne
16 Replies

9. UNIX for Dummies Questions & Answers

Find files and display only directory list containing those files

I have a directory (and many sub dirs beneath) on AIX system, containing thousands of file. I'm looking to get a list of all directory containing "*.pdf" file. I know basic syntax of find command, but it gives me list of all pdf files, which numbers in thousands. All I need to know is, which... (4 Replies)
Discussion started by: r7p
4 Replies

10. UNIX for Advanced & Expert Users

How to unzip a file ftped from Window box?

Hi, How to unzip and file which FTP'ed from Windows box? File name is ABC.ZIP I tried unzip and gunzip -S .ZIP ABC.ZIP i am getting following error gunzip: ABC.ZIP: unknown suffix -- ignored Any info is appreciated! ~t (10 Replies)
Discussion started by: terala_s
10 Replies
Login or Register to Ask a Question