Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
we have many unix-type server , they sometimes have files transfer between them by some method eg .ftp , ssh , rcp , I would like to ask if I want to know what file is transferring / receiving from remote server , for example , if I want to know what file is transferring ( eg. by the command of ssh ) , I heard the command "watch" may do that , I tried watch -n 10 ssh but not work , can advise what can i do it ? thx.
If you know the upload directory (say it's "/var/upload") you could use lsof like 'lsof -w -n +D/var/upload'. Another alternative method could be to use a kernel facility like [i|d]notify. FAM (check out FAM) used dnotify in kernel 2.4 but it's generally considered nonperformant. Inotify is kernel 2.6's answer with which you can use say inotifywait ('inotifywait -m -r -e create /var/upload) and maybe a script that logs whatever it gets to syslog. Using inotify on kernel 2.4 is kind of invasive since it requires the inotify backport kernel patch (and I don't know if it's in the vanilla kernel source) but at least you know there's an alternative.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.