Jump to content
Incepat0r

Bash scripting afisare fisiere din director

Recommended Posts

Posted (edited)

Salut!

As vrea sa afisez toate numele de fisierele dintr-un director, iar problema este ca as vrea ca scriptul sa ruleze in mod continuu si sa afiseze si noile fisiere create dupa rularea scriptului.

Practic ar trebui un "tail" facut ca un "ls" executat continuu.

Aveti ceva sugestii, eu ma gandeam sa folosesc "watch -n"?

Edited by Incepat0r
  • Active Members
Posted (edited)

Poti face un script care sa ruleze comanda dir o data la x timp.

Ceva de genul:

   @Echo OFF

:START
DIR /b /s | sort
SLEEP 20
GOTO END

// am crezut ca vrei in windows :)

Linux like:

watch -n 1 ls -ltr /ceva_director

Edited by MrGrj

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...