Check These Out
Can be useful to granulary flush files in a CDN after they've been changed in the S3 bucket.
The command renames all files in a certain directory. Renaming them to their date of creation using EXIF. If you're working with JPG that contains EXIF data (ie. from digital camera), then you can use following to get the creation date instead of stat.
* Since not every file has exif data, we want to check that dst is valid before doing the rest of commands.
* The output from exif has a space, which is a PITA for filenames. Use sed to replace with '-'.
* Note that I use 'echo' before the mv to test out my scripts. When you're confident that it's doing the right thing, then you can remove the 'echo'... you don't want to end up like the guy that got all the files blown away.
Credits: http://stackoverflow.com/questions/4710753/rename-files-according-to-date-created
Like many other thing in Linux ,you can see the same thing in different way.
Use sed to remove comments from a file.
In this example the comments begin with #.
The command '/^#/d' remove line starting with #.
The command 's/#.*$//' remove comments at end of lines.
Displays the same output as "cal", but with the current day highlighted (probably dependent on gnu grep, as I'm not sure other grep's support the "--color=auto" option). Tested and working on Ubuntu 11 and OSX Lion.
somewhat faster version to see the size of our directories. Size will be in Kilo Bytes. to view smallest first change '-k1nr' to '-k1n'.
Logtool is a nice tool that can export log file to various format, but its strength lies in the capacity of colorize logs. This command take a log as input and colorize it, then export it to an html file for a more confortable view. Logtool is part of logtool package.Tested on Debian.
Use the following variation for FreeBSD:
$ openssl rand 6 | xxd -p | sed 's/\(..\)/\1:/g; s/:$//'
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"