STEST(1)

πŸ’… STEST β€” like, the file filter of your dreams (section 1, bestie)

okay so welcome to stest(1) from the General Commands Manual, and no cap this little cutie is SO underrated 🫢


✨ NAME ✨

stest β€” filter a list of files by properties πŸ’–


🌸 SYNOPSIS 🌸

stest [-abcdefghlpqrsuwx] [-n file] [-o file] [file...]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: stest takes a whole list of files and filters them by the files' properties, literally analogous to test(1) πŸŽ€ Files that pass all the tests get printed to stdout, slay.

And if you don't hand it any files at all? It just reads files from stdin instead. lowkey iconic behaviour πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

one bullet per flag, all of them, no skipping, periodt:

  • -a β€” test hidden files πŸ‘€
  • -b β€” test that files are block specials
  • -c β€” test that files are character specials
  • -d β€” test that files are directories πŸ“
  • -e β€” test that files exist (the bare minimum tbh)
  • -f β€” test that files are regular files
  • -g β€” test that files have their set-group-ID flag set
  • -h β€” test that files are symbolic links πŸ”—
  • -l β€” test the contents of a directory given as an argument
  • -n file β€” test that files are newer than file ⏰
  • -o file β€” test that files are older than file πŸ•°οΈ
  • -p β€” test that files are named pipes
  • -q β€” no files are printed, only the exit status is returned 🀫
  • -r β€” test that files are readable πŸ“–
  • -s β€” test that files are not empty
  • -u β€” test that files have their set-user-ID flag set
  • -v β€” invert the sense of tests, only failing files pass πŸ™ƒ (the plot twist flag)
  • -w β€” test that files are writable ✍️
  • -x β€” test that files are executable πŸƒ

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” at least one file passed all tests πŸŽ‰
  • 1 β€” no files passed all tests 😭
  • 2 β€” an error occurred πŸ’₯

πŸ”₯ SEE ALSO πŸ”₯

dmenu(1), test(1) β€” go read those too, iykyk πŸ’œ


and that's the whole vibe check, bestie 🌈 this page is from dmenu-5.4 and it's the STEST(1) manual, so go filter some files and be the main character of your own shell session βœ¨πŸ’…πŸŽ€

πŸ“¦ where this page comes from