03-22-2014
Download latest file via ftp server unix through shell script
Hello this is my first post in this forum , I dont want to be unhappy..
I am writing one script but facing difficulty to find the latest file with some new pattern
My requirement is
1. The file is coming like "ABCD-23220140303" at FTP server once in a week.
2. script will run on daily basis and will pick up and download the file to Aix machine if file is available.
3. Script will check status of file on daily basis, if file is available it should download.
the file name is like varies for each week like..
1st week....ABCD-23220140301 MARCH 1ST WEEK 2014
2nd week....ABCD-23220140302
3rd week....ABCD-23220140303
4th week....ABCD-23220140304
WANTED TO DWONLOAD ONLY LATEST FILE.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
Hope u r doing fine.
I'm writing a shell script to ftp the latest file having pericular convention as 'ULTI_15072007043205.txt' on daily basis.
Now the date & timing of the file geleration isnt constant, so the file name daily varies as per the date & timing of generation.
Can anyone... (7 Replies)
Discussion started by: im_new
7 Replies
2. Shell Programming and Scripting
Hi,
I need to ftp some input files from windows to unix server.All the files will be saved in the C drive in my machine.
Currently all these files are transferring manually to the unix server.I need to write a shell script which ftp the files
from windows to unix box.When I searched in the... (10 Replies)
Discussion started by: kavithakuttyk
10 Replies
3. Shell Programming and Scripting
Dear all,
Hope you are doing well.
I am in trouble to write a shell for ftp downloading the latest file from remote server.
Situation:
There is a directory named 'weekly' which contains .csv files with the following pattern: RES_EN_100417-080003.csv.Z. The new file is generated... (3 Replies)
Discussion started by: kel1014
3 Replies
4. Shell Programming and Scripting
How to FTP the latest file, based on date, from a remote server through a shell script?
I have four files to be FTP'ed from remote server.
They are of the following format.
build1_runtime_mmddyyyy.txt
build2_runtime_mmddyyyy.txt
build3_runtime_mmddyyyy.txt
buifile_count_mmddyyyy.txt
... (9 Replies)
Discussion started by: imran_affu
9 Replies
5. Shell Programming and Scripting
Hi,
Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting?
If so what command i need to use.
thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies
6. Shell Programming and Scripting
Hello,
I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver.
Here's what I have that finds the newest file:
find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies
7. UNIX for Advanced & Expert Users
Dear Friends,
I need help to write a shell / perl script to download the files from FTP location, having different file names (date inside the file name).
Example:
Mar 5 09:24 cfx_03052013_return_file.txt
Mar 6 02:13 cfx_03062013_return_file.txt
Mar 7 06:40... (3 Replies)
Discussion started by: Praveen Pandit
3 Replies
8. Shell Programming and Scripting
Hi All,
Please help.
I have requirement to read the file / folder based on the latest date and download the file and folder.
There will be files and folders in the location like
20140630-144422
20140630-144422.csv
20140707-182653
20140707-182653.csv
20140710-183153... (7 Replies)
Discussion started by: Praveen Pandit
7 Replies
9. Shell Programming and Scripting
HI Guys,
I want to download files from FTP Server to my Unix server.
I have tried , buy No Luck .
Below Command i have tried.
1-Wget - Error "wget' not found"
2.ftp -n $HOST ...Not Working.
3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt
Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies
10. Ubuntu
Hello people,
I have to download, with a scheduled script, the latest file from an FTP server.
In the remote DIR, named .../TEKNONET/60468/, every night a CDR file like this gets uploaded into it: 000006046820151122N001.CDR, so my script will have to download every day the previous day... (12 Replies)
Discussion started by: virtus96
12 Replies
LEARN ABOUT DEBIAN
accounting
ACCOUNTING(1) SMPPPD ACCOUNTING(1)
NAME
accounting - calculates statistics about your internet connections
DESCRIPTION
accounting is a simple program to calculate statistics about your internet dial-up connections that are started and stopped by either ifup
and ifdown or by a frontend to smpppd like cinternet , qinternet or kinternet.
OPTIONS
These options are recognized by accounting. If a long option shows an argument as mandatory, then it is mandatory for the equivalent short
option also.
-l, --last=NUM
Only consider the last NUM connections.
-a, --after=DATE
Only consider connections started after DATE. DATE is a date with optional time in ISO 8601 format, e.g. `2002-12-24 20:15:00'.
Note that a date without time is treated as if the time is 00:00:00. Hence connections started on the specified date are consid-
ered.
-b, --before=DATE
Only consider connections started before DATE.
-u, --user=USER
Only consider connections started by user USER.
--this-year
Only consider connections started this year.
--last-year
Only consider connections started last year.
--this-month
Only consider connections started this month.
--last-month
Only consider connections started last month.
--this-week
Only consider connections started this week.
--last-week
Only consider connections started last week.
--today
Only consider connections started today.
--yesterday
Only consider connections started yesterday.
--per-year
Show summaries on a per year basis.
--per-month
Show summaries on a per month basis.
--per-week
Show summaries on a per week basis.
--per-day
Show summaries on a per day basis.
-c, --connections
Only list the connections but do not show provider statistics.
-p, --providers
Do not list the connections only show the provider statistics.
--connection-format=FORMAT
The names of the columns to print in the connection list. The names must be separated by a comma. Known column names are time,
type, provider, user, status, duration, rx, tx, rxtx, averx, avetx and averxtx. Each name may be appended by a colon and a number
indicating the width for the column, e.g. provider:25. The value will not be truncated if the width is too small.
--provider-format=FORMAT
The names of the columns to print in the provider list equivalent to the --connection-format option. Known column names are
provider, number, duration, rx, tx, rxtx, aveduration, averx, avetx and averxtx.
--local
Display all dates in local time. Also interpret dates on the command line in local time. This is the default.
--utc Display all dates in UTC. Also interpret dates on the command line in UTC.
--script[=STYLE]
Format output for script. Known styles are c and sh.
-f, --file=NAME
Use a different file with accounting information.
--report-errors
Report erros in the accounting file.
--version
Show program version and exit.
--help Show help information and exit.
NOTES
All informations are only obtained through the accounting log. Hence the informations, esp. the data volume, of currently active connec-
tions is not accurate. If you want the know the status of a connection, use ifstatus or a frontend to smpppd like cinternet , qinternet or
kinternet instead.
The user field is empty for connections started by a remote frontend of smpppd.
BUGS
Not yet implemented for ISDN (ippp).
FILES
/var/log/smpppd/accounting.log
File containing accounting information.
SEE ALSO
kinternet, qinternet, cinternet(1), smpppd(8), smpppd-ifcfg(8).
AUTHOR
Arvin Schnell <arvin@suse.de>
SuSE December 2002 ACCOUNTING(1)