Sponsored Content
Top Forums UNIX for Advanced & Expert Users The best way to skin a cat OR how do I get file system info on the most basic level? Post 302279063 by mph on Wednesday 21st of January 2009 11:09:23 PM
Old 01-22-2009
Quote:
Originally Posted by Annihilannic
1) Each time you process the directory, touch a flag file. Then use find /pathname -newer /path/to/flagfile. Doesn't really save you the overhead of running find but saves you having to do comparisons.
The problem with that is files dragged from Windows don't always update the time stamp on the file(s) being transferred. I've tried using the atime, mtime, and ctime of the files, none of which would work 100% of the time.
Quote:
2) Does vsftpd keep the file open for the entire duration of the transfer? If so you could use fuser on the file until it shows no processes accessing it, and then assume that the upload is complete. Normally the best way is to upload files to a temporary name and then rename them when complete, but that requires end-user actions which probably aren't appropriate in your situation.
Now that's a good question. I don't know, didn't even think of it, but I can check on it. Thanks!
Quote:
I'm kind of surprised though that vsftpd doesn't log an upload complete event, even at a not very verbose level?
vsftpd does log when the transfer is complete. But we have users that will transfer 5 - 15 files at times. I don't really want a notification for each file, just one when the lot is complete. So for now when it sees a complete transfer with sleeps for 15 seconds, checks the filesystem size for changes, if yes waits for the next transfer to complete, if not, send the email.
Quote:
Incidentally, if you are prepared to consider a commercial product, Tumbleweed's SecureTransport is a good product for doing most of what you describe... i.e. triggered actions based on incoming files, etc.
I've not heard of Tumbleweed, nor been able to find much of anything like what I'm doing. Thanks! I'll check it out, but I know the company won't spring for it until the economy picks up. I am in an auto related field.

Thanks a bunch!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

basic server info

I'm so new to sys admin work that my ears haven't dried yet. Here's my question: what scripts are available to gather pkginfo, prtdiag, and volume info? I need to gather this type of info from 18 servers of various types: oracle db servers, license servers, nis masters and slaves, etc.... (2 Replies)
Discussion started by: antalexi
2 Replies

2. Programming

Does anyone have example code for getting File System info on AIX

I'm looking for example C source of how to get file system information on AIX systems. Does anyone have anything? (3 Replies)
Discussion started by: StuBob
3 Replies

3. Shell Programming and Scripting

basic cat replace string

trying to exclude hostnames ending in "s" from a host file: # cat hosts ssef ssefd ssefsfff ssefsfs # for x in `cat hosts`; do echo "${x/*s}" ;done ef efd fff # How can I echo/or not echo only 'ssefsfs' ?? thanks (4 Replies)
Discussion started by: prkfriryce
4 Replies

4. UNIX for Dummies Questions & Answers

got a basic doubt on cat-file permissions

Hi all, Today I was just fooling around with directories and faced this. I create a directory 'testdir' and create a file 'myfile' inside it. gandalf@gondor:~$ mkdir testdir gandalf@gondor:~$ cd testdir gandalf@gondor:~/testdir$ touch myfile Then I set the following permissions for the... (7 Replies)
Discussion started by: ranj@chn
7 Replies

5. Shell Programming and Scripting

Have a basic 'for i in cat list' - Trying to get i to be set to a name with a space

Hi Have a file called ldap.list: ****** "o=unix forum" o=groups ****** i wrote a basic script that runs: for i in `cat ldap.list` do ldapsearch -h host -p 389 -b $i THE PROBLEM: - It looks like when the for i in cat ldap.list runs, it doesn't seem to care about the " ", it... (2 Replies)
Discussion started by: littlefrog
2 Replies

6. UNIX for Dummies Questions & Answers

basic Server info on Mac os x

Hi how do i look at the basic server info through terminal on mac. I have the username and password for a web server and i am assigned to add a new url to the web server, but i have no idea where to start. how do i check what kind of server it is? how do i get the DNS information? most... (0 Replies)
Discussion started by: mj330
0 Replies

7. UNIX for Dummies Questions & Answers

Basic System Info Template

If your boss ask you to create a template for all UNIX systems. Max 10 questions of the system. What would you put down? The system can be any UNIX flavor. Some examples: 1. system name 2. OS 3. ETC What would be for you the most important and relevants. (2 Replies)
Discussion started by: 300zxmuro
2 Replies

8. IP Networking

Best reference for understanding low level info on nic cards drivers and functionality

Hi, What is the best reference that gives in detail on nic cards configuration , assigning multiple ip addresses to a single interface, netlink library etc and all basic stuff at this level..? Thanks (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies

9. Programming

New to programming, need some basic info.

So, I'm actually new to programming, and thought some basics would be really benefiting to me, I'm not really asking to be spoon-fed with everything you know, I just need some info to show where should i start, I can figure the rest by myself, but really am in doubt about which programming language... (3 Replies)
Discussion started by: MEdgeworth
3 Replies

10. Solaris

Basic question regarding root file system copy to another disk

Hello, I am creating a new disk using the following command: dd if=/dev/zero of=/export/home/ramdisk/0 bs=512 count=4096k after creating the disk, i tool a ufsdump of a solaris 10 filesytem (disk size 512MB) ufsdump -cvf /export/home/ufsdump/sol_orig /and then restored the dump files onto... (10 Replies)
Discussion started by: Zam_1234
10 Replies
curl_easy_init(3)						  libcurl Manual						 curl_easy_init(3)

NAME
curl_easy_getinfo - Extract information from a curl session (added in 7.4) SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... ); DESCRIPTION
Request internal information from the curl session with this function. The third argument MUST be a pointer to a long, a pointer to a char * or a pointer to a double (as this documentation describes further down). The data pointed-to will be filled in accordingly and can be relied upon only if the function returns CURLE_OK. This function is intended to get used *AFTER* a performed transfer, all results from this function are undefined until the transfer is completed. AVAILABLE INFORMATION
These are informations that can be extracted: CURLINFO_EFFECTIVE_URL Pass a pointer to a 'char *' to receive the last used effective URL. CURLINFO_HTTP_CODE Pass a pointer to a long to receive the last received HTTP code. CURLINFO_FILETIME Pass a pointer to a long to receive the remote time of the retrieved document. If you get -1, it can be because of many reasons (unknown, the server hides it or the server doesn't support the command that tells document time etc) and the time of the document is unknown. Note that you must tell the server to collect this information before the transfer is made, by using the CURLOPT_FILE- TIME option to curl_easy_setopt(3). (Added in 7.5) CURLINFO_TOTAL_TIME Pass a pointer to a double to receive the total transaction time in seconds for the previous transfer. This time does not include the connect time, so if you want the complete operation time, you should add the CURLINFO_CONNECT_TIME. CURLINFO_NAMELOOKUP_TIME Pass a pointer to a double to receive the time, in seconds, it took from the start until the name resolving was completed. CURLINFO_CONNECT_TIME Pass a pointer to a double to receive the time, in seconds, it took from the start until the connect to the remote host (or proxy) was completed. CURLINFO_PRETRANSFER_TIME Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. CURLINFO_STARTTRANSFER_TIME Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is just about to be trans- fered. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result. CURLINFO_REDIRECT_TIME Pass a pointer to a double to receive the total time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started. CURLINFO_REDIRECT_TIME contains the complete execution time for mul- tiple redirections. (Added in 7.9.7) CURLINFO_REDIRECT_COUNT Pass a pointer to a long to receive the total number of redirections that were actually followed. (Added in 7.9.7) CURLINFO_SIZE_UPLOAD Pass a pointer to a double to receive the total amount of bytes that were uploaded. CURLINFO_SIZE_DOWNLOAD Pass a pointer to a double to receive the total amount of bytes that were downloaded. CURLINFO_SPEED_DOWNLOAD Pass a pointer to a double to receive the average download speed that curl measured for the complete download. CURLINFO_SPEED_UPLOAD Pass a pointer to a double to receive the average upload speed that curl measured for the complete upload. CURLINFO_HEADER_SIZE Pass a pointer to a long to receive the total size of all the headers received. CURLINFO_REQUEST_SIZE Pass a pointer to a long to receive the total size of the issued requests. This is so far only for HTTP requests. Note that this may be more than one request if FOLLOWLOCATION is true. CURLINFO_SSL_VERIFYRESULT Pass a pointer to a long to receive the result of the certification verification that was requested (using the CURLOPT_SSL_VERI- FYPEER option to curl_easy_setopt). (Added in 7.4.2) CURLINFO_CONTENT_LENGTH_DOWNLOAD Pass a pointer to a double to receive the content-length of the download. This is the value read from the Content-Length: field. (Added in 7.6.1) CURLINFO_CONTENT_LENGTH_UPLOAD Pass a pointer to a double to receive the specified size of the upload. (Added in 7.6.1) CURLINFO_CONTENT_TYPE Pass a pointer to a 'char *' to receive the content-type of the downloaded object. This is the value read from the Content-Type: field. If you get NULL, it means that the server didn't send a valid Content-Type header or that the protocol used doesn't support this. (Added in 7.9.4) RETURN VALUE
If the operation was successful, CURLE_OK is returned. Otherwise an appropriate error code will be returned. SEE ALSO
curl_easy_setopt(3) BUGS
Surely there are some, you tell me! libcurl 7.9.7 25 Apr 2002 curl_easy_init(3)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy