看板 [ Perl ]
討論串[問題] 如何找出所有的leaf directories?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者cutecpu (可愛中央處理器)時間16年前 (2009/06/12 18:33), 編輯資訊
0
0
0
內容預覽:
#!/usr/bin/perl -w. &dfs('/home/user');. sub dfs{. my $dic = shift;. my $leaf = 1;. for(<$dic/*>){. $leaf = &dfs($_) if(-d $_);. }. print "$dic\n" if(

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者jawdc1129 (everest)時間16年前 (2009/06/11 22:59), 編輯資訊
0
0
0
內容預覽:
請問一下, 要如何找尋一個系統下的所有leaf directories?. 比如說在 unix /home/user 下找出所有 leaf directories 的名字並把它列印出來. 謝謝. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 202.154.201.1.
首頁
上一頁
1
下一頁
尾頁