simpli Posted June 16, 2009 Share Posted June 16, 2009 Hi, I am running leopard and I would like to know how I can output the list of a directory's structure to a file. When I get configuration problems, it's always useful to show my directory structure and I spent 30 minutes trying to find a program or a command that would allow me to obtain that to no avail. Anyone can help? Thanks, JR Quote Link to comment https://forums.phpfreaks.com/topic/162330-solved-obtain-directory-structure-on-mac-os-x/ Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 On Windows, you can use 'tree'. It's a long shot, but maybe the command is the same on Mac. Quote Link to comment https://forums.phpfreaks.com/topic/162330-solved-obtain-directory-structure-on-mac-os-x/#findComment-856829 Share on other sites More sharing options...
Zane Posted June 16, 2009 Share Posted June 16, 2009 I'm no Mac Guru, but from what I've seen of it..it acts almost like Linux. Perhaps the command ls or ll or even dir would work Quote Link to comment https://forums.phpfreaks.com/topic/162330-solved-obtain-directory-structure-on-mac-os-x/#findComment-856870 Share on other sites More sharing options...
simpli Posted June 16, 2009 Author Share Posted June 16, 2009 ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' will do it. Quote Link to comment https://forums.phpfreaks.com/topic/162330-solved-obtain-directory-structure-on-mac-os-x/#findComment-857170 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 Hrmmm, there has to be a simpler way than that surely lol... Quote Link to comment https://forums.phpfreaks.com/topic/162330-solved-obtain-directory-structure-on-mac-os-x/#findComment-857176 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.