Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to detect files transmission at UNIX server ? Post 302968522 by schandrakar1 on Thursday 10th of March 2016 08:29:12 AM
Old 03-10-2016
How to detect files transmission at UNIX server ?

Dear Expert Users,

I know that Unix utility ( fuser ) is used to detect "transmission" of files from Source system to "current Linux Server".

I have scheduled this Unix script to work every 30th minutes of the hour and whenever files transmission starts at that very moment.
And, the file is picked up for transmission even though the file has not fully arrived at the "current Linux server".

This is the problem .. Kindly help ??

Code:
 # Check if the file is still being written at the Server
/bin/fuser -u ${FILE} > ${LOCAL_PATH}/process_file 2>/dev/null
PROCESS_ID=`cat ${LOCAL_PATH}/process_file`
if [ ${PROCESS_ID} ] ; then
echo "${FILE} file is still being written. Will attempt to sFTP at next iteration" >> ${LOGFILE}
echo "${FILE} file is still being written. Will attempt to sFTP at next iteration"
echo
echo "------------------------" >> ${LOGFILE}
echo
else
echo "Create batchfile for the file, ${FILE}" >> ${LOGFILE}
echo "Create batchfile for the file, ${FILE}"
. ${SCRIPT_PATH}/Create_batchfile.sh
echo


Last edited by Don Cragun; 03-10-2016 at 03:18 PM.. Reason: Remove the COLOR tags from the code.
 

10 More Discussions You Might Find Interesting

1. Programming

direct transmission of files via TCP/IP

Hi, is it possible to write files via write() to a socket and read it on the other side via read(), without going through buffers? Iif not via write() and read() are there other possibilities? thanks darkspace (5 Replies)
Discussion started by: darkspace
5 Replies

2. Shell Programming and Scripting

script for to take files from FTP server to UNIX server and Unzipped that files

script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

3. Programming

[C++] [Unix] TCP non-blocking. Detect server disconnection procedure over, from client.

Hello! I searched forum for similar topic, with no luck, if you know one, delete this topic, and send me private message with link please. Little background: I have a lot of clients and one serwer. Client can make multiple connections on different ports and ips, but only one can be acctive... (2 Replies)
Discussion started by: ikeban
2 Replies

4. Shell Programming and Scripting

Find and delete files and folders which are n days older from one unix server to another unix server

Hi All, Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older. Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N'... (2 Replies)
Discussion started by: sachinkl
2 Replies

5. Shell Programming and Scripting

Copy folder and files from unix server to linux server

We would be migrating unix solaries to Linux redhat. Basically source is unix and target is linux. i would like to copy entire file system unix/source/* to target linux/souce/* but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Discussion started by: balajikalai
8 Replies

6. Shell Programming and Scripting

I need to move files from one UNIX server to another UNIX server.

Hi, I have two unix servers i need to move files from one server to another. For example: i have some files in Server1 and i want to run script in server2 to move files from server1. Any suggestion Thanks in advance (1 Reply)
Discussion started by: karingulanagara
1 Replies

7. UNIX for Dummies Questions & Answers

File transmission logs in UNIX

Can any one give a explaination with examples on how to understand file transmission log files in Unix for inbound and outbound traffic. (1 Reply)
Discussion started by: ITDev01
1 Replies

8. Linux

How to detect FC lun on Server?

I have created a lun on Storage and connected it to server using fiber channel. LUN is presented on new Server . How do i check and mount this newly created LUN? (1 Reply)
Discussion started by: pinga123
1 Replies

9. Solaris

FTP-ing files from Windows server to UNIX server

I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output. Is it possible to transfer files from Windows server to unix server through any shell script? If so can you please help me with the details. Thanks in... (8 Replies)
Discussion started by: ssk250
8 Replies

10. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies
TRANSMISSION-CREATE(1)					    BSD General Commands Manual 				    TRANSMISSION-CREATE(1)

NAME
transmission-create -- command-line utility to create .torrent files SYNOPSIS
transmission-create [-h] [-p] [-o file] [-c comment] [-t tracker] [source file or directory] DESCRIPTION
transmission-create creates BitTorrent .torrent files from the command line OPTIONS
-h --help Show a short help page and exit. -o --outfile Save the generated .torrent to this filename. -p --private Flag the torrent as intended for use on private trackers. -c --comment Add a comment to the torrent file. -t --tracker Add a tracker's announce URL to the .torrent. Most torrents will have at least one announce URL. To add more than one, use this option multiple times. AUTHORS
Jordan Lee SEE ALSO
transmission-create(1), transmission-daemon(1), transmission-edit(1), transmission-gtk(1), transmission-qt(1), transmission-remote(1), transmission-show(1) http://www.transmissionbt.com/ BSD
June 9, 2010 BSD
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy