Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-16-2009, 01:53 AM   #1
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, 02:00 AM   #2
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
try with watch command,
watch ls -l
Old 06-16-2009, 02:11 AM   #3
Senior Member
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: pclinuxos slackware64 tails kali
Posts: 3,374
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)?

ref. (gone!)
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

I hope this helps you, regards Glenn

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


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 09:12 AM
Change my mac address in interval of time!! wanas Linux - Networking 8 03-27-2009 04:10 AM
Setting cronjob time interval to a small number mohtasham1983 Linux - General 4 09-18-2008 11:28 PM
Can't perform root command by using Sudo acbenny Linux - General 6 05-07-2008 09:19 PM
how-to: repeat OR iterate shell OR bash command delay OR interval admarshall Linux - General 5 07-18-2005 11:47 PM > Forums > Linux Forums > Linux - Newbie

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

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