SoftwarePractice.org: Home | Courseware | Wiki | Archive

Unix tips and tricks

From SoftwarePractice.org

Unix is, as we all know, "quite powerful." But for things that you don't do that often, you forget how to do. Here's a few of them that I've come up with, written here so I can find them again without having to read man pages all over again.

  • Display a directory listing with permissions shown in octal. This was my response to a query on the TextDrive forum.
  stat -f "%Sp %Lp %N" *
  • Display all .jpg files larger than 300kbytes (approx)
  find . -size +300000c -name *.jpg


FreeBSD-specific stuff

  • To set the timezone to GMT:
cp /usr/share/zoneinfo/Etc/GMT /etc/localtime
Personal tools