Listing files and folders well-arranged

Many people know the problem: You have to find something, but you’re having no idea where to find it. Of course, you can use „locate“ or „find“ and search for the file. But what’s the best possibility for getting an overview about directories, files, binaries or subdirectories?
YES – it’s using the „tree“ command. But what are you going to do, if you’re working on a managed server without any root-access and without the possibility to install tree? 
Here’s a short solution for this problem:

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'

Das könnte Dich auch interessieren …

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Time limit is exhausted. Please reload the CAPTCHA.