Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here are the specs: Find all files in / modified after the modification time of /tmp/test, exclude /proc and /sys from the search, and print the full path of the file along with human readable size. Here is what I have so far:

find / \( -path /proc -o -path /sys \) -prune -o -newer /tmp/test -exec ls -lh {} \; | less

The issue is that the full path doesn't get printed. Unfortunately, ls doesn't support printing the full path! And all solutions I have found that show how to print the full path suggest using find. :|

Any ideas? Thanks!

share|improve this question

Instead of -exec ls -lh {} \; you can also use the printf option:

find / \( -path /proc -o -path /sys \) -prune -o -newer /tmp/test -printf "%s %p\n" | less

Although that will just print the size in bytes and not in the nice human-readable format ls supports.

share|improve this answer
+1 for POSIX and non-ls solution. – l0b0 Jun 25 '13 at 7:55

Add -d to the ls command.

find / \( -path /proc -o -path /sys \) -prune -o -newer /tmp/test -exec ls -lhd {} \; | less

That will also fix the problem you were bound to have with files showing up twice in your list.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.