Check These Out
Encodes HTML entities from input (file or stdin) so it's possible to directly past the result to a blog or HTML source file.
By putting the "-not \( -name .svn -prune \)" in the very front of the "find" command, you eliminate the .svn directories in your find command itself. No need to grep them out.
You can even create an alias for this command:
$ alias svn_find="find . -not \( -name .svn -prune \)"
Now you can do things like
$ svn_find -mtime -3
If you don't want to delete them, but just want to list them, do
$ find -L /path -type l
If you want to delete them with confirmation first, do
$ find -L /path -type l -exec rm -i {} +
Using the -L flag follows symlinks, so the -type l test only returns true if the link can't be followed, or is a symlink to another broken symlink.
The +short option should make dig less chatty.
Replace 'csv_file.csv' with your filename.
There's probably a more efficient way to do this rather than the relatively long perl program, but perl is my hammer, so text processing looks like a nail.
This is of course a lot to type all at once. You can make it better by putting this somewhere:
$ clf () { (curl -d "q=$@" http://www.commandlinefu.com/search/autocomplete 2>/dev/null) | egrep 'autocomplete|votes|destination' | perl -pi -e 's/$/\n\n/g;s/^ +|\([0-9]+ votes,//g;s/^\//http:\/\/commandlinefu.com\//g'; }
Then, to look up any command, you can do this:
$ clf diff
This is similar to http://www.colivre.coop.br/Aurium/CLFUSearch except that it's just one line, so more in the spirit of CLF, in my opinion.
Replace 'this' with 'that'
available timezone can be found in /usr/share/zoneinfo. Other examples:
$ TZ=Europe/Paris date; TZ=Australia/Sydney date; TZ=America/New_York date
this is based on zoneinfo files on macosx. Your mileage my vary on other unix dialects
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials