LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2009, 12:53 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
How to perform command in time interval?


I want to see gradual change in size of file under file transfer from remote Machine.
Lemme explain:
Say, When I run
#ls -la it shows me group of files and folder.
Say I have a file called remote.dump which is being copied to my machine.
Everytime I need to do ls command to see what size its upto.
Is there any method I can monitor this command for size:

Like free -m -s 2 can be provided for regular interval of 2 secs.Likewise , I need for ls command too.
 
Old 06-16-2009, 01:00 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
try with watch command,
watch ls -l
 
Old 06-16-2009, 01:11 AM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: pclinuxos slackware64 tails kali
Posts: 3,372
Blog Entries: 33

Rep: Reputation: 217Reputation: 217Reputation: 217
ls -s gives the size in blocks.

You could use it this way

ls -las

for details as well.

Then setup a cron job to run it . but...

won't rsync display a new line every-time the file's downloaded size is updated to the terminal (shell)?

http://www.linuxquestions.org/questi...-files-721873/

Quote:
ref. http://blog.lxpages.com/ (gone!)
Apr17
Fun With Rsync - Part I

What is Rsync?
rsync is a file transfer program for Unix systems. rsync uses the “rsync algorithm” which provides a
very fast method for bringing remote files into sync. It does this by sending just the differences in
the files across the link, without requiring that both sets of files are present at one of the ends of
the link beforehand. Some features of rsync include

1. Can update whole directory trees and filesystems
2. Optionally preserves symbolic links, hard links, file ownership, permissions, devices and times
3. Requires no special privileges to install
4. Internal pipelining reduces latency for multiple files
5. Can use rsh, ssh or direct sockets as the transport
6. Supports anonymous rsync which is ideal for mirroring
http://samba.anu.edu.au/rsync/

I hope this helps you, regards Glenn

Last edited by GlennsPref; 06-16-2009 at 01:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
capturing .TIFF images at a configurable time interval and sending to a usb drive DrZuhoch Linux - Newbie 3 05-04-2009 08:12 AM
Change my mac address in interval of time!! wanas Linux - Networking 8 03-27-2009 03:10 AM
Setting cronjob time interval to a small number mohtasham1983 Linux - General 4 09-18-2008 10:28 PM
Can't perform root command by using Sudo acbenny Linux - General 6 05-07-2008 08:19 PM
how-to: repeat OR iterate shell OR bash command delay OR interval admarshall Linux - General 5 07-18-2005 10:47 PM


All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration