LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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,466
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,278

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: Devuan
Posts: 3,656
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 AM.

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
Open Source Consulting | Domain Registration