免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 956 | 回复: 4
打印 上一主题 下一主题

这样的目录树怎样做成? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-07-28 15:02 |只看该作者 |倒序浏览
请注意+号

  1. +- bin  
  2. +- Main  
  3. |   +- draft  
  4. |   +- inbox  
  5. |   +- outbox     
  6. +- doc  
复制代码

论坛徽章:
0
2 [报告]
发表于 2004-07-28 17:20 |只看该作者

这样的目录树怎样做成?

请高手指点 man tree 怎么也实现不了,
自己顶顶!!

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
3 [报告]
发表于 2004-07-28 17:26 |只看该作者

这样的目录树怎样做成?

tree?哪里有下的?我知道windows console有这个东西,我的fedora core 1 没有。

论坛徽章:
0
4 [报告]
发表于 2004-07-28 22:09 |只看该作者

这样的目录树怎样做成?


  1. Last login: Wed Jul 28 21:57:38 2004 from **********************
  2. Welcome to Turbolinux.
  3. [****@** *****]$ uname -s
  4. Linux
  5. [****@** *****]$ uname -a
  6. Linux ** 2.2.18-18 #1 Tue Mar 18 10:11:03 JST 2003 i686 unknown
  7. [****@** *****]$ man tree
  8. TREE(1)                                                   TREE(1)

  9. NAME
  10.        tree - list contents of directories in a tree-like format.

  11. SYNOPSIS
  12.        tree [ -adfgilnopqstuxACDFNS ] [ -L level [  -R  ]]  [  -H
  13.        baseHREF ] [ -P pattern ] [ -I pattern ] [ directory ... ]

  14. DESCRIPTION
  15.        Tree is a recursive directory listing  program  that  pro-
  16.        duces  a  depth  indented  listing of files, which is col-
  17.        orized ala dircolors if the LS_COLORS environment variable
  18.        is  set  and  output  is  to tty.  With no arguments, tree
  19.        lists the files in the current directory.  When  directory
  20.        arguments  are  given,  tree  lists  all  the files and/or
  21.        directories found in the given directories each  in  turn.
  22.        Upon  completion  of  listing all files/directories found,
  23.        tree returns the total number of files and/or  directories
  24.        listed.

  25.        By  default, when a symbolic link is encountered, the path
  26.        that the symbolic link refers to is printed after the name
  27.        of the link in the format:

  28.            name ->; real-path

  29.        If  the  `-l' option is given and the symbolic link refers
  30.        to an actual directory, then tree will follow the path  of
  31.        the symbolic link as if it were a real directory.

  32. OPTIONS
  33.        Tree understands the following command line switches:

  34.        --help Outputs a verbose usage listing.

  35.        --version
  36.               Outputs the version of tree.

  37.        -a     All  files  are  printed.  By default tree does not
  38.               print hidden files  (those  beginning  with  a  dot
  39.               `.').   In no event does tree print the file system
  40.               constructs `.' (current directory) and `..' (previ-
  41.               ous directory).

  42.        -d     List directories only.
  43.                                                                                 
  44.        -f     Prints the full path prefix for each file.

  45.        -i     Makes  tree not print the indentation lines, useful
  46.               when used in conjunction with the -f option.

  47.        -l     Follows symbolic links if they  point  to  directo-
  48.               ries,  as  if they were directories. Symbolic links
  49.               that will result  in  recursion  are  avoided  when
  50.               detected.

  51.        -x     Stay  on  the  current  file-system only.  Ala find
  52.               -xdev.

  53.        -P pattern
  54.               List only those files that match the wild-card pat-
  55.               tern.   Note:  you  must  use the -a option to also
  56.               consider those files beginning with a dot  `.'  for
  57.               matching.   Valid  wildcard  operators are `*' (any
  58.               zero or more characters), `?' (any  single  charac-
  59.               ter),  `[...]' (any single character listed between
  60.               brackets (optional - (dash) for character range may
  61.               be used: ex: [A-Z]), and `[^...]' (any single char-
  62.               acter not listed in brackets).

  63.        -I pattern
  64.               Do not list those files that  match  the  wild-card
  65.               pattern.

  66.        -p     Print the protections for each file (as per ls -l).

  67.        -o filename
  68.               Send output to filename.

  69.        -s     Print the size of each file along with the name.

  70.        -u     Print the username, or UID  #  if  no  username  is
  71.               available, of the file.

  72.        -g     Print  the group name, or GID # if no group name is
  73.               available, of the file.

  74.        -D     Print the date of the last  modification  time  for
  75.               the file listed.

  76.        -F     Append  a  `/'  for  directories,  a `=' for socket
  77.               files, a `*' for executable files  and  a  `|'  for
  78.               FIFO's, as per ls -F

  79.        -q     Print  non-printable  characters  in  filenames  as
  80.               question marks instead of the default carrot  nota-
  81.               tion.

  82.        -N     Print non-printable characters as is instead of the
  83.               default carrot notation.

  84.        -t     Sort the output by last modification  time  instead
  85.               of alphabetically.

  86.        -n     Turn colorization off always, over-ridden by the -C
  87.               option.

  88.        -C     Turn colorization on always, using  built-in  color
  89.               defaults  if  the LS_COLORS environment variable is
  90.               not set.  Useful to colorize output to a pipe.

  91.        -A     Turn on ANSI line graphics hack when  printing  the
  92.               indentation lines.

  93.        -S     Turn  on  ASCII  line  graphics  (useful when using
  94.               linux console mode fonts).

  95.        -L level
  96.               Max display depth of the directory tree.

  97.        -R     Recursively cross down the tree each level directo-
  98.               ries  (see  -L option), and at each of them execute
  99.               tree again adding `-o 00Tree.html' as a new option.

  100.        -H baseHREF
  101.               Turn  on  HTML  output,  including HTTP references.
  102.               Useful for ftp sites.  baseHREF gives the base  ftp
  103.               location when using HTML output. That is, the local
  104.               directory may be `/local/ftp/pub', but it  must  be
  105.               referenced       as       `ftp://hostname.organiza-
  106.               tion.domain/pub' (baseHREF should  be  `ftp://host-
  107.               name.organization.domain/').  Hint:  don't use col-
  108.               orization and/or ANSI lines with this  option,  and
  109.               don't give more than one directory in the directory
  110.               list.

  111. FILES
  112. :

复制代码

论坛徽章:
0
5 [报告]
发表于 2004-07-28 22:12 |只看该作者

这样的目录树怎样做成?

我没有搞明白,请高手指点
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP