Refresh ls list on screen (auto-refresh)?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Refresh ls list on screen (auto-refresh)?
# 1  
Old 04-11-2006
Refresh ls list on screen (auto-refresh)?

I am looking for a way to issue a command or string of commands to repeatedly display new files that are written to the directory. I usually use ls -ltr to see the newest files at the bottom of the screen. I would like to automate this command to refresh what is displayed every second or so. Can this be done at the command line or in a .ksh script? I seem to have found a way to do this many years ago but I am returning to UNIX (HPUX) now and can't remember how this was done.

Thanks in advance!
# 2  
Old 04-11-2006
hi

write your ls commad in crontab and make it run for each minute..
# 3  
Old 04-11-2006
while [ 1 ]
do
clear
ls -lrt
sleep 60
done

run the above commands in ksh command line prompt to autorefresh in screen
# 4  
Old 11-13-2007
Easier to use 'watch'

$ watch ls -ltr
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. IP Networking

C - IP change during a hardware refresh?

Hi All, I was told to perform analysis for IP change during a hardware refresh? Does the IP change when a hardware refresh is performed? if Yes, why? (5 Replies)
Discussion started by: visitsany
5 Replies

2. Programming

Motif Application will not refresh

I have a Motif Application created with XtVaAppInitialize. I have two field widgets, created with XmCreateTextField. Now when I programmatically change the data in any of the two fields, the widgets don't get refreshed, only after a mouse over. I have tried anything, from including the "xrefresh"... (4 Replies)
Discussion started by: JenniferKuiper
4 Replies

3. UNIX for Dummies Questions & Answers

Auto Refresh iptables's webmin settings

Hello people :) Here it's a simple thing to do, but really hard for me ^^' I use webmin and don't want to stop use it, but I'm stucked with something ... I search how refresh webmin's iptables rules ??? Some details about my problem : I ban a range of ip, because of users using dynamic... (0 Replies)
Discussion started by: WolwX
0 Replies

4. Programming

ncurses refresh()

i have read in one of links, there its documented but i am using following code int main () { char ch; initscr(); printw("Enter a char :"); ch=getch(); printw("You Entered '%c' ",ch); getch(); endwin(); return 0; } the code does... (2 Replies)
Discussion started by: MrUser
2 Replies

5. Shell Programming and Scripting

refresh ps ax |grep using a script

hi all I want to refresh ps ax |grep something using a script every n seconds. Plz advise how to do that. (2 Replies)
Discussion started by: coolatt
2 Replies

6. UNIX for Dummies Questions & Answers

refresh user profile

Scenario: a non-root user is under primary group "devel" and I change their primary group to "nondevel"; I then want to be able to give the user a command which refreshes their user profile so that any new files created under their session are assigned to the new group. What is the command for... (1 Reply)
Discussion started by: dhinge
1 Replies

7. AIX

Refresh window?

Hi, for my first time using AIX, I haven't had much luck and I was wondering if I could get some urgent help. I had a terminal open and had allocated some space to a new volume group and then logical partition to "/foldername". I then went to go to netscape, so I typed that in the terminal and it... (0 Replies)
Discussion started by: JimmyFo
0 Replies

8. Linux

How to increase refresh rate

Hi, I am using fc3, and I would like to know how to increase monitor refresh rate. I have tried "Applications" > "Preferences" > "Screen Resolution" but I can't seem to increase greater than 85Hz. I have tried to edit /etc/X11/xorg,conf but not sure how to... So here is my file. How... (6 Replies)
Discussion started by: armen
6 Replies
Login or Register to Ask a Question