Posts tagged ‘linux’

Fsniper

fsniper allow to monitor your folders and trigger some actions based on the type of files you have there.

Example: ~/.config/fsniper/config
PDF files downloaded from Firefox on the desktop, get moved to ~/Desktop/pdf.

watch {
~/Desktop {
*.part {
handler = echo ignoring file: %%
}
application/pdf {

handler = mv %% ~/Desktop/pdf
}
}
}

Fsniper can be run in daemon mode:

fsniper --daemon

usermod, groupadd

Add group with specfic id:
# groupadd -g {gid} {group}

Add existing user to existing group:
# usermod -G {group} {username}

Check to which group a user belong:

# id -nG {username}

Remove existing user to existing groups (group1,group2,group3.group4), e.g remove it from group3:

# usermod -G {group1,group2,group4} {username}