Check These Out
Problem: I wanted to backup user data individually, using and incremental method. In this example, all user data is located in "/mnt/storage/profiles", and about 25 folders inside, each with a username ( /mnt/storage/profiles/mike; /mnt/storage/profiles/lucy ...)
I need each individual folder backed up, not the whole "/mnt/storage/profiles". So, using find while excluding directories depth and creating two variables (tarfile=username & desdir=destination), tar will create a .tgz file for each folder, resulting in a "mike_2013-12-05.tgz" and "lucy_2013-12-05.tgz".
replaces "\n" with "+"
On Mageia (and Mandriva) Linux, this command will clear your existing urpmi configuration and configure it to use only network sources. It can be useful after you have installed from CD/DVD and
don't want to continually be prompted to insert CD/DVD each time you install a package.
acknowledgement: blino
For this hack you need following function:
$ finit() { count=$#; current=1; for i in "$@" ; do echo $current $count; echo $i; current=$((current + 1)); done; }
and alias:
$ alias fnext='read cur total && echo -n "[$cur/$total] " && read'
Inspired by CMake progress counters.
Backup a whole directory copying only updated files.
After executing this, click on a window you want to track X Window events in.
Explaination: "xev will track events in the window with the following -id, which we get by greping window information obtained by xwininfo"
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
This command is adapted from http://otomaton.wordpress.com/2012/12/26/find-broken-symbolic-links/
Solutions with
$ find -L
don't work when the link is a loop, an error message is printed.