I need to show a long listing of files in a directory but only those that are a certain size in bytes. Can someone tell me how to do this?


The command you need is:

$ find /dir -type f -size 2048

where type f defines it if a file the size argument defines the number of bytes

  • Do you mean find and not file? – Timothy Martin Nov 17 '15 at 19:02
  • Yes, silly me, I stand corrected. – Rui F Ribeiro Nov 17 '15 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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