Check These Out
Mirror a remote directory using some tricks to maximize network speed.
lftp:: coolest file transfer tool ever
-u: username and password (pwd is merely a placeholder if you have ~/.ssh/id_rsa)
-e: execute internal lftp commands
set sftp:connect-program: use some specific command instead of plain ssh
ssh::
-a -x -T: disable useless things
-c arcfour: use the most efficient cipher specification
-o Compression=no: disable compression to save CPU
mirror: copy remote dir subtree to local dir
-v: be verbose (cool progress bar and speed meter, one for each file in parallel)
-c: continue interrupted file transfers if possible
--loop: repeat mirror until no differences found
--use-pget-n=3: transfer each file with 3 independent parallel TCP connections
-P 2: transfer 2 files in parallel (totalling 6 TCP connections)
sftp://remotehost:22: use sftp protocol on port 22 (you can give any other port if appropriate)
You can play with values for --use-pget-n and/or -P to achieve maximum speed depending on the particular network.
If the files are compressible removing "-o Compression=n" can be beneficial.
Better create an alias for the command.
Rotates log files with "gz"-extension in a directory for 7 days and enumerates the number in file name.
i.e.: logfile.1.gz > logfile.2.gz
I needed this line due to the limitations on AIX Unix systems which do not ship with the rename command.
This will generate 3 paragraphs with random text. Change the 3 to any number.
doesn't require "at", change the "2h" to whatever you want... (deafult unit for sleep is seconds)
probably only works if you have one graphics card.
used this: http://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/
as reference
can be expanded, for example:
$ lspci -v -s `lspci | awk '/VGA/{print $1}'` | sed -n '/Memory.*, prefetchable/s/.*\[size=\([^]]\+\)\]/\1/p'
will just get the amount of prefetchable memory
compare to:
$ lshw -C display
which does not give the size (it does give byte ranges and you could calculate the size from that, but that's a pain)
Also uses a command which is not standard on linux; wheras lspci is a core utility provided by most systems
I've been looking for this for a long time. Does anybody know how to do this in dash (POSIX shell)?
An alternative version might be:
$ exiftool img_1.jpg | diff -
Use sed to edit in-place a list of files returned by find.