Sponsored Content
Top Forums Shell Programming and Scripting Finding latest file in dir but getting syntax errors Post 302997600 by giuliangiuseppe on Wednesday 17th of May 2017 06:57:58 AM
Old 05-17-2017
Can you send the error message?

Thanks

G
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding latest file in Unix

Hi, i want to search a file in the dir , if file exists for todays date print the message that file found or if file does not exist for todays date/ if file not found i want to display message saying that file not found. How to do this. Thx for your help. (2 Replies)
Discussion started by: nick12
2 Replies

2. Shell Programming and Scripting

finding latest file having timestamp on it.....

Hi guys, I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name. Below is the file format: filename_yyyymmdd.csv, i need to pick the latest and move it with the... (1 Reply)
Discussion started by: kaushik25
1 Replies

3. Shell Programming and Scripting

Loop through files in dir, omit file with latest date

I want to loop through files in a directory but omit the file with the latest date in my list of files. How would I accomplish this? Thanks (2 Replies)
Discussion started by: stringzz
2 Replies

4. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

5. Shell Programming and Scripting

RSYNC syntax for pushing file with latest system date

OK, I am a little new to AIX 5.3 and also to scripting. I have a shell script that I wrote and am having difficulty pushing specific files by the system date. Here is my script: #!/usr/bin/sh RSYNC=/usr/local/bin/rsync SSH=/usr/local/bin/ssh KEY=<path> somekey.key RUSER=mike... (4 Replies)
Discussion started by: tfort73
4 Replies

6. Shell Programming and Scripting

Finding the Latest file in a Dir

Hi Everyone, I am writing a shell script and I am struck here: I need to find the latest file in a directory depending upon the date. For example: The files in the directory are: Filename_bo_20110619 Filename_bo_20110620 Filename_bo_20110621 Filename_bo_20110622 So here, I want... (2 Replies)
Discussion started by: filter
2 Replies

7. Shell Programming and Scripting

Finding errors in log file only in last 10 minutes

Hi there, I have a log file that I need to check every 10 minutes to find if a specific error exists but only in that 10 minute period. The reason is that the log is quite large, and will frequently contain these errors, so I only want alerting if it in the last 10 minutes - I don't want... (3 Replies)
Discussion started by: paul_vf
3 Replies

8. UNIX for Dummies Questions & Answers

Finding latest dir based on it's name (yyyymmdd)

Hi Folks, As part of my application I need to find out what the latest directory based on the name of that directory (not it's file system timestamp). Example: I have a directory which contains below directories (each of while contains files etc) 20120000/ 20120000/ latest (symbolic link to... (5 Replies)
Discussion started by: DOWD_R
5 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Finding the latest file in a directory

Hi All, I am using the below command to find the latest file in a dir: ls -tr $v_sftphomedir/$v_sourcefile |tail -1 or ls -t1 $v_sftphomedir/$v_sourcefile |head -1 and the outpur returned is below: /home/cobr_sftp/var/controllingload/Backup/Dbrwds_Div_1796050246.txt I need only the... (5 Replies)
Discussion started by: abhi_123
5 Replies

10. Shell Programming and Scripting

Help with finding the latest modified version of a file within directories

I am trying to look into multiple directories and pluck out the latest version of a specific file, regardless of where it sits within the directory structure. Ex: The file is a .xls file and could have a depth within the directory of anywhere from 1-5 Working directory - Folder1... (6 Replies)
Discussion started by: co21ss
6 Replies
send(2) 							System Calls Manual							   send(2)

Name
       send, sendto, sendmsg - send a message from a socket

Syntax
       #include <sys/types.h>
       #include <sys/socket.h>

       cc = send(s, msg, len, flags)
       int cc, s;
       char *msg;
       int len, flags;

       cc = sendto(s, msg, len, flags, to, tolen)
       int cc, s;
       char *msg;
       int len, flags;
       struct sockaddr *to;
       int tolen;

       cc = sendmsg(s, msg, flags)
       int cc, s;
       struct msghdr msg[];
       int flags;

Description
       The  and system calls are used to transmit a message to another socket.	The system call may be used only when the socket is in a connected
       state, while the and system calls may be used at any time.

       The address of the target is given by to, with tolen specifying its size.  The length of the message is given by len.  If  the  message	is
       too  long  to  pass atomically through the underlying protocol, the error EMSGSIZE is returned, and the message is not transmitted.  If the
       address specified in the argument is a broadcast address, the SO_BROADCAST option must be set for broadcasting to succeed.

       No indication of failure to deliver is implicit in a Return values of -1 indicate some locally detected errors.

       If no messages space is available at the socket to hold the message to be transmitted, normally blocks, unless the socket has  been  placed
       in nonblocking I/O mode.  The call can be used to determine when it is possible to send more data.

       The flags parameter can be set to MSG_OOB to send out-of-band data on sockets that support this features (for example, SOCK_STREAM).

       See for a description of the msghdr structure.

       The call returns the number of characters sent, or -1 if an error occurred.

Diagnostics
       [EBADF]		   An invalid descriptor was specified.

       [EDESTADDRREQ]	   A required address was omitted from an operation on a socket.

       [EFAULT] 	   An invalid user space address was specified for a parameter.

       [EINVAL] 	   An invalid argument length for the message was specified.

       [EINTR]		   The send was interrupted by delivery of a signal.

       [ENOTCONN]	   The socket is not connected.

       [ENOTSOCK]	   The argument s is not a socket.

       [EMSGSIZE]	   The socket requires that messages be sent atomically, and the size of the message to be sent made this impossible.

       [EPIPE]		   A write on a pipe or socket for which there is no process to read the data.

       [EWOULDBLOCK]	   The socket is marked nonblocking, and the requested operation would block.

See Also
       recv(2), getsockopt(2), socket(2)

																	   send(2)
All times are GMT -4. The time now is 09:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy