AnswerBun.com

watch tail -20 ls -ltr?

Unix & Linux Asked by Dong gi Kang on December 17, 2020

I would like to see the latest content of a directory.

I tried watch tail -20 ls -ltr ./{directory} it is not working.

Is there a way to constantly shows the content of a directory like watch command?

One Answer

You need to generate the directory list first (ls), then limit it (tail) and watch the whole thing:

watch "ls -ltr ./ | tail -20"

Correct answer by user1794469 on December 17, 2020

Add your own answers!

Related Questions

SSH on port 443 with SSLH

1  Asked on December 21, 2021

   

Reformat date to unix time stamp in csv table

3  Asked on December 21, 2021

   

i3wm / debian accent marks

2  Asked on December 21, 2021 by danoiseman

   

View 1 monitor in VNC session?

1  Asked on December 21, 2021

     

Problem after installing snapd

1  Asked on December 21, 2021 by hr20dev

     

what’s the relationship between iptables and firwalld

1  Asked on December 21, 2021 by westfarmer

         

What is my shell environement?

1  Asked on December 21, 2021 by mikibelavista

   

How to reinstall python

1  Asked on December 19, 2021 by aditya-ultra

     

Nvidia driver; Unable to load info from any available system

1  Asked on December 19, 2021 by whitewind

   

No external network access on Beaglebone

0  Asked on December 19, 2021

     

Port forwarding with KVM

0  Asked on December 19, 2021 by ari-stehney

   

Copy/paste into SSH’d VIM from local (Windows) clipboard

10  Asked on December 17, 2021 by frickskit

     

How to get tab completion when using curly braces in Bash

5  Asked on December 17, 2021 by weston-ganger

   

libpam-pwquality not working in Ubuntu 16.04

1  Asked on December 17, 2021

 

Asus TUF Ubuntu 18.04.1 elantech mouse freezes frequently

1  Asked on December 17, 2021 by srajan-soni

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir