Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

simulate a tree command using Shell Script that displays all the directories recursively

Featured Replies

 

Good day dear Armbian-experts, hello everyone 

 

hope that youre all right and all goes well at your side. 


i want to simulate a tree command using Shell Script that displays all the directories recursively in this format:

.

.
|-- Lorem
|-- Lorem
|-- Lorem
    |-- Lorem
    |-- Lorem
|-- Lorem
`-- Lorem

 

 

how can this be achived?

note: i want to do this on a MX-Linux system - well i can do this with Tree - but wait. I guess that tree has to be installed first..

1. Not sure what you are trying to do, but tree have a lot of command line options.

 

2. Surely it is open source, go look up sources to study implementation details?

 

27 minutes ago, malaga said:

i want to do this on a MX-Linux system

 

3. This has nothing to do with Armbian, maybe try #linux on libera.chat or (any of the many, many) other general Linux resources on the Internet.

  • Author

hello dear TRS-80 

 

first of all - many many thanks for the quick reply.  You were right.

 

This is not focussed on the Armbian - i am sorry that i was posting anything against the forum rules. 

 

Sorry. - i will try to figure it out - and will read some manpages. 

 

Again - sorry for the posting.  I am very glad to be part of this great Community - i am a big big Armbian-Fan. 

 

have  a great day. 

 

 

find . -type d | awk -F/ '{printf("%"4*NF"s|-- %s\n", " ",$NF)}'

 

(find in current dir all files of type directory and process them threw awk with "/" field separator to print a space with 4 times number of fields width, then a bar and two dash and the last field.

 

awk is your friend

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.