Skip to content

Comment on Managing Work-In-Progress Folders with “ls -ltr”parent

Comments

  **/*
does not match the '-type f' part of his filter:
  $ mkdir -p /tmp/test1/test2/test3
  $ touch /tmp/test1/test2/test3/test4
  $ ls -ltr /tmp/test1/**/*
  -rw-r--r-- 1 usr grp    0 2012-08-07 09:59 /tmp/test1/test2/test3/test4

  /tmp/test1/test2:
  total 4
  drwxr-xr-x 2 usr grp 4096 2012-08-07 09:59 test3

  /tmp/test1/test2/test3:
  total 0
  -rw-r--r-- 1 usr grp 0 2012-08-07 09:59 test4
On the other hand:
  $ find /tmp/test1 -type f -print0 | xargs -0 ls -ltr
  -rw-r--r-- 1 usr grp 0 2012-08-07 09:59 /tmp/test1/test2/test3/test4
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.