Sponsored Content
Top Forums Shell Programming and Scripting shell script to get the arrival count of file Post 302345707 by RSC1985 on Thursday 20th of August 2009 03:45:33 AM
Old 08-20-2009
shell script to get the arrival count of file

Hello All,

I have come across a small problem. It would be great if any of you could help me in resolving the issue.

one file named dummy.txt will be ftped to Unix machine twice daily. If i receive it second time in a day i need to do some processing with the file.


How to find the number of times it arrived to Unix box?

Please help me by giving some ideas?

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File arrival status

If there is a file being transferred from one box to another box, How can one confirm on the 2nd box..that the file has arrived, and transfer is complete ? I mean in addition to checking the file exists, I want to confirm its transferred completely and not growing in size. (4 Replies)
Discussion started by: amsh76
4 Replies

2. Shell Programming and Scripting

need to invoke a script upon arrival of a file

hi all, i recieve a file from other server, on a daily basis .... but the time of arrival is unpredictable .... i need to move this file to another directory before the next file arrives ... i have written a script that does this op and performs some manipulations on the data... but i... (2 Replies)
Discussion started by: sais
2 Replies

3. Shell Programming and Scripting

count multiple objects in shell script

Hi all: Trying to count the number of oracle instances on HPUX 11.23 - using ksh. I have multiple instances running and I would like to have a count for how many processes for each instance. Example, run the 'ps -efu oracle' command and for each instance increment a counter. So I am looking for... (4 Replies)
Discussion started by: raggmopp
4 Replies

4. Shell Programming and Scripting

Hit count on a shell script

I have a unix shell script (ex.sh) written. How to find out how many users (incl. myself) have run this .sh ? I can insert code snipet at top of script if need be. - Ravi (2 Replies)
Discussion started by: ravi368
2 Replies

5. Shell Programming and Scripting

Need File arrival time(sftp) command

Hi All, I am getting some file through using sftp from another server to my server. I want know the exact file arrival time on my sytem I have tried stat command . it gives me the below details $ stat abc.txt File: `abc.txt Size: 24231 Blocks: 48 IO Block:... (5 Replies)
Discussion started by: aish11
5 Replies

6. Shell Programming and Scripting

Print record count of a file using shell script

HI, I need to print the record count of a file using shell script. If the record count of a file excluding header and trailer record if greater than zero then print 'Record count of a file is xxxx records'. If the record count is zero print 'zero records' Thanks Mahendra (1 Reply)
Discussion started by: mmeda
1 Replies

7. Shell Programming and Scripting

Validate file count in korn shell script

Hi, I have files in the directory like below which I need to validate if all the required files are present. A_B_001 of 002_time1.txt A_B_002 of 002_time1.txt A_B_001 of 001_time2.txt Scenarios- a)If file with 001 of 002_time1 or 002 of 002_time1 is missing in the folder,script should... (6 Replies)
Discussion started by: aneeta13
6 Replies

8. UNIX for Dummies Questions & Answers

Script shell calculate mean arrival request duration

hello, I have implemented this command : tshark -eth0 -T fiels -e frame.time et sip.Request-Line -z sip,stat > test2.txt the result of this command : test.txt: Aug 27, 2013 23:06:47.334270000 INVITE Aug 27, 2013 23:06:47.335045000 SIP/2.0 401 Unauthorized Aug 27, 2013... (1 Reply)
Discussion started by: Amouna
1 Replies

9. Shell Programming and Scripting

File Count Based on FileDate using Shell Script

I have file listed in my directory in following format -rwxrwxr-x+ 1 test test 4.9M Oct 3 16:06 test20141002150108.txt -rwxrwxr-x+ 1 test test 4.9M Oct 4 16:06 test20141003150108.txt -rwxrwxr-x+ 1 test test 4.9M Oct 5 16:06 test20141005150108.txt -rwxrwxr-x+ 1 test ... (2 Replies)
Discussion started by: krish2014
2 Replies

10. Shell Programming and Scripting

Script Shell: Count The sum of numbers in a file

Hi all; Here is my file: V1.3=4 V1.4=5 V1.1=3 V1.2=6 V1.3=6 Please, can you help me to write a script shell that counts the sum of values in my file (4+5+3+6+6) ? Thank you so much for help. Kind regards. (3 Replies)
Discussion started by: chercheur111
3 Replies
BOS_SETRESTART(8)					       AFS Command Reference						 BOS_SETRESTART(8)

NAME
bos_setrestart - Sets when the BOS Server restarts processes SYNOPSIS
bos setrestart -server <machine name> -time <time to restart server> [-general] [-newbinary] [-cell <cell name>] [-noauth] [-localauth] [-help] bos setr -s <machine name> -t <time to restart server> [-g] [-ne] [-c <cell name>] [-no] [-l] [-h] DESCRIPTION
The bos setrestart command records in the /etc/openafs/BosConfig file the times at which the BOS Server running on the server machine named by the -server argument performs two types of restarts: o A general restart. The BOS Server will restart itself, and then any AFS process marked with the "Run" status flag in the BosConfig file (equivalent in effect to issuing the bos restart command with the -bosserver flag) at this time each week. By default, in a new bos installation, general restarts are disabled. o A binary restart. By default, once per day the BOS Server restarts any currently running process for which the timestamp on the binary file in the /usr/lib/openafs directory is later than the time the process last started or restarted. The default is 5:00 a.m. each day. CAUTIONS
Restarting a process makes it unavailable for a period of time. The fs process has potentially the longest outage, depending on how many volumes the file server machine houses (the File Server and Volume Server reattach each volume when they restart). The default settings are designed to coincide with periods of low usage, so that the restarts disturb the smallest possible number of users. If the setting specified with the -time argument is within one hour of the current time, the BOS Server does not restart any processes until the next applicable opportunity (the next day for binary restarts, or the next week for general restarts). The command changes only one type of restart setting at a time; issue the command twice to change both settings. OPTIONS
-server <machine name> Indicates the server machine on which to set a new restart time. Identify the machine by IP address or its host name (either fully- qualified or abbreviated unambiguously). For details, see bos(8). -time <time to restart server> Specifies the restart time. By convention the general restart is defined as weekly (specifies both a day and a time), and the binary restart is defined as daily (specifies only a time). However, it is acceptable to define a daily general restart or weekly binary restart. There are four acceptable values for either type of restart setting: o The string "never", which directs the BOS Server never to perform the indicated type of restart. o The string "now", which directs the BOS Server to perform the restart immediately and never again. o A time of day (the conventional type of value for the binary restart time). Separate the hours and minutes with a colon (hh:MM), an use either 24-hour format, or a value in the range from "1:00" through "12:59" with the addition of "am" or "pm". For example, both "14:30" and "2:30 pm" indicate 2:30 in the afternoon. Surround this parameter with double quotes ("") if it contains a space. o A day of the week and time of day, separated by a space and surrounded with double quotes (""). This is the conventional type of value for the general restart. For the day, provide either the whole name or the first three letters, all in lowercase letters ("sunday" or "sun", "thursday" or "thu", and so on). For the time, use the same format as when specifying the time alone. If desired, precede a time or day and time definition with the string "every" or "at". These words do not change the meaning, but possibly make the output of the bos getrestart command easier to understand. -general Sets the general restart time. -newbinary Sets the binary restart time. -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8). -noauth Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see bos(8). -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see bos(8). -help Prints the online help for this command. All other valid options are ignored. EXAMPLES
The following command sets the general restart time on the machine "fs4.abc.com" to Saturday at 3:30 am. % bos setrestart -server fs4.abc.com -time "sat 3:30" -general The following command sets the binary restart time on the machine "fs6.abc.com" to 11:45 pm. % bos setrestart -server fs6.abc.com -time 23:45 -newbinary PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on the machine named by the -server argument, or must be logged onto a server machine as the local superuser "root" if the -localauth flag is included. SEE ALSO
BosConfig(5), KeyFile(5), UserList(5), bos(8), bos_getrestart(8), bos_restart(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BOS_SETRESTART(8)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy