Skip to content

Instantly share code, notes, and snippets.

@michaelcoyote
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelcoyote/3f9c2732925a539e676f to your computer and use it in GitHub Desktop.
Save michaelcoyote/3f9c2732925a539e676f to your computer and use it in GitHub Desktop.
Stupid tilde.club tricks

Generate a list of users with a uid greater than 500

awk -F: '$3 > 500 {print $1}' /etc/passwd

Look for users with a space after the username grep " :x" /etc/passwd

It is possible to set the TZ variable on a per user or even per script basis.

If you are a bash user for example, you can place this in your ~/.bashrc file:

export TZ="/usr/share/zoneinfo/US/Eastern"

Find all the users who aren't running irssi

comm -13 <(ps -C irssi -o fuser |grep -v USER|sort|uniq) <(awk -F: '$3 > 500 {print $1}' /etc/passwd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment