Sponsored Content
Full Discussion: Directory tree search???
Top Forums Programming Directory tree search??? Post 7585 by LivinFree on Friday 28th of September 2001 01:47:18 AM
Old 09-28-2001
There are several ways to list all conents recursively. The most common is probably:
ls -lR. It's usually helpful to redirect to a file:
ls -lR > ls-lR.txt

You can use the find command, although it may be slower:
find . -type f -print. Again, you might want to redirect to a file.

And then, some systems have a utility called tree installed. If you have it, it'll actually draw a very simple diagram for your directory tree...

Hope that helps.
 

10 More Discussions You Might Find Interesting

1. Programming

directory as tree

hi i have modified a program to display directory entries recursively in a tree like form i need an output with the following guidelines: the prog displays the contents of the directory the directory contents are sorted before printing so that directories come before regular files if an entry... (2 Replies)
Discussion started by: anything2
2 Replies

2. Shell Programming and Scripting

directory tree

Hi all, The following is a script for displaying directory tree. D=${1:-`pwd`} (cd $D; pwd) find $D -type d -print | sort | sed -e "s,^$D,,"\ -e "/^$/d"\ -e "s,*/\(*\)$,\:-----\1,"\ -e "s,*/,: ,g" | more exit 0 I am trying to understand the above script.But... (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

3. UNIX for Dummies Questions & Answers

Protecting the directory tree

Hello, I am hoping someone maybe able to help me. I have set up an Apache web server on my sun server with user accounts in the main htdocs directory. My question is how to stop these users searching up the directory tree when they ftp/telnet to the server. Also is it possible to restrict the... (2 Replies)
Discussion started by: rooneyl
2 Replies

4. UNIX for Dummies Questions & Answers

Move all files in a directory tree to a signal directory?

Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management. Thanks in advance- Brian- (2 Replies)
Discussion started by: briandanielz
2 Replies

5. Shell Programming and Scripting

creating a directory tree

Hi all, I'd like to create a directory tree, and define from stdin how many levels deep and how many directories in each level should be created. What I wrote does not work properly:#!/bin/bash #set -x read -p " What root directory? " rootDir && { /bin/rm -R $rootDir; mkdir $rootDir; } ||... (2 Replies)
Discussion started by: NBaH
2 Replies

6. UNIX for Dummies Questions & Answers

directory tree with directory size

find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/' Can someone explain how this works..?? How can i add directory size to be listed in the above command's output..?? (1 Reply)
Discussion started by: vikram3.r
1 Replies

7. Programming

Binary Search Tree Search problem

I am writing code for a binary search tree search and when I compile it i am getting strange errors such as, " /tmp/ccJ4X8Xu.o: In function `btree::btree()': project1.cpp:(.text+0x0): multiple definition of `btree::btree()' " What does that mean exactly? tree.h #ifndef TREE_H #define... (1 Reply)
Discussion started by: meredith1990
1 Replies

8. Shell Programming and Scripting

Specific directory parsing in a directory tree

Hi friends, Hello again :) i got stuck in problem. Is there any way to get a special directory from directory tree? Here is my problm.." Suppose i have one fix directory structure "/abc/xyz/pqr/"(this will be fix).Under this directory structure i have some other directory and... (6 Replies)
Discussion started by: harpal singh
6 Replies

9. Programming

Binary search tree questions. Please help =)

I have some questions about certain placement of child nodes since I'm just learning BSTs and it's quite confusing even after reading some sources and doing some online insertion applets. Let's say I want to add nodes 5,7,3,4 to an empty basic BST. ... (1 Reply)
Discussion started by: Jill Ceke
1 Replies

10. UNIX for Dummies Questions & Answers

To do directory tree search

Hello Everyone, I need to find the file / directory with the maximum timestamp in a directory tree having many files / directories. Could you please help. Thanks, H squared (3 Replies)
Discussion started by: H squared
3 Replies
SQLT-DIAGRAM(1p)					User Contributed Perl Documentation					  SQLT-DIAGRAM(1p)

NAME
sqlt-diagram - Automatically create a diagram from a database schema SYNOPSIS
./sqlt-diagram -d|-f|--from|--db=db_parser [options] schema.sql Options: -o|--output Output file name (default STDOUT) -i|--image Output image type ("png" or "jpeg," default "png") -t|--title Title to give schema -c|--cols Number of columns -n|--no-lines Don't draw lines --font-size Font size ("small," "medium," "large," or "huge," default "medium") --gutter Gutter size between tables --color Add colors --show-fk-only Only show fields that act as primary or foreign keys --natural-join Perform natural joins --natural-join-pk Perform natural joins from primary keys only -s|--skip Fields to skip in natural joins --skip-tables Comma-separated list of table names to exclude --skip-tables-like Comma-separated list of regexen to exclude tables --debug Print debugging information DESCRIPTION
This script will create a picture of your schema. Only the database driver argument (for SQL::Translator) is required. If no output file name is given, then image will be printed to STDOUT, so you should redirect the output into a file. The default action is to assume the presence of foreign key relationships defined via "REFERENCES" or "FOREIGN KEY" constraints on the tables. If you are parsing the schema of a file that does not have these, you will find the natural join options helpful. With natural joins, like-named fields will be considered foreign keys. This can prove too permissive, however, as you probably don't want a field called "name" to be considered a foreign key, so you could include it in the "skip" option, and all fields called "name" will be excluded from natural joins. A more efficient method, however, might be to simply deduce the foriegn keys from primary keys to other fields named the same in other tables. Use the "natural-join-pk" option to achieve this. AUTHOR
Ken Youens-Clark <kclark@cpan.org>. perl v5.14.2 2012-01-18 SQLT-DIAGRAM(1p)
All times are GMT -4. The time now is 11:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy