Check These Out
Allows you to preserve your files when using cp, mv, ln, install or patch. When the target file exists, it will generate a file named XXX.~N~ (N is an auto-incremental number) instead of deleting the target file.
So you are in directory with loads of pictures laying around and you need to quickly scan through them all
Just another curl command to get your public facing IP
Useful when you're trying to unmount a volume and other sticky situations where a rogue process is annoying the hell out of you.
A common mistake in Bash is to write command-line where there's command a reading a file and whose result is redirected to that file.
It can be easily avoided because of :
1) warnings "-bash: file.txt: cannot overwrite existing file"
2) options (often "-i") that let the command directly modify the file
but I like to have that small function that does the trick by waiting for the first command to end before trying to write into the file.
Lots of things could probably done in a better way, if you know one...
Do the unlock KDE screen saver locked session with lightdm display manager used in Kubuntu 12.10 +
It is helpful to know the current limits placed on your account, and using this shortcut is a quick way to figuring out which values to change for optimization or security.
Alias is:
$ alias ulimith="command ulimit -a|sed 's/^.*\([a-z]\))\(.*\)$/-\1\2/;s/^/ulimit /'|tr '\n' ' ';echo"
Here's the result of this command:
$ ulimit -c 0 -d unlimited -e 0 -f unlimited -i 155648 -l 32 -m unlimited -n 8192 -p 8 -q 819200 -r 0 -s 10240 -t unlimited -u unlimited -v unlimited -x unlimited
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 155648
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 8192
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Some commands have more information on 'info' than in the man pages
Takes all the .3gp files in the directory, rotates them by 90 degrees, and saves them in the lossless ffv1 encoding.
If this rotates in the wrong direction, you may want transponse=1
Re-encoding to ffv1 may result in a significant increase in file size, as it is a lossless format. Other applications may not recognize ffv1 if they don't use ffmpeg code. "huffyuv" might be another option for lossless saving of your transformations.
The audio may be re-encoded as well, if the encoding used by your 3gp file doesn't work in a avi container.