Linux one liners

Linux one liners

Diff two directories

Set suid

File: File executes as the user that owns the file, not the user that ran the file

Set sgid

File: File executes as the group that owns the file
Dir: Files newly created in the directory have their group owner set to match the group owner of the directory


Set Sticky bit

File: no effect
Dir: User with write on the directory can only remove files that they own, they can not remove files owned by other users

Tar + gzip on the fly in linux

List all ips on ifconfig except loopback

List sockets to Listen on in httpd.conf

Find ips set to listen on httpd.conf

Find sockets set to listen in all files under a directory

Find ips set to listen in all files under a directory

find all ips set to listen in all httpd.conf files

Scripts

some useful linux/unix scripts

linux dedupe problems?

Here’s a nice dedupe script i found: