Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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