lftp -e ‘pget -n url’
lftp -e ‘pget -n url’
$ string="unix bash script tutorial"
$ string="${string//[^i]/}"; echo ${#string}
$ echo $((`echo $string|sed 's/[^i]//g'|wc -m`-1))
I am in awe of both Linux and Java.
The problem is Unix pipes communication is not available for Java. There are 2-3 different Inter-Process Communication Libraries available and a couple of Posix based communication libraries available. I have been having problems using them in my codeline.
What I need is:
cat <fileName> | java process | head
The java process is a high process intensive work. So, when the default 10 entries using head are displayed, the head sends a SIGKILL event notification to Java Process. Since Java does not capture this, the process is not killed, but keeps on going till the java process is complete which takes a while.
Let me contact the authors of some of these java lib developers, to see how we can get this going.
Take a look at this: http://tldp.org/LDP/tlk/ipc/ipc.html
Following is some analysis conducted by Vamsi Kundenti. Find this info here.
I reproduce this here just in case the original website goes down.
<–Start –>
“I happened to look at the algorithmic details of UNIX Sort, a LINUX version of the classic UNIX sort is a part of GNU coreutils-6.9.90. This is classic example of the standard External R-Way merge , to sort a data of size N bytes with a main memory size of M so it creates N/M runs and merges R at a time, the number of passes through the data is log(N/M)/log(R) passes.In fact the lower bound(runtime) for external sorting is Ω((N/M)log(N/M)/log(R)). All the external memory sorting algorithms provided in the literature are optimal so the fight here is minimizing the constant before the number of passes.
UNIX sort treats keys are lines (strings), the algorithm followed by unix sort is in fact the R-Way merge. Let the input file size be IN_SIZE.
1. Choosing Run Size:
——————————–
The sizes of the initial runs are chosen from the total physical memory (TOTAL_PHY) and available memory (AVAIL_PHY). RUN_SIZE = (MAX(TOTAL_PHY/8,AVAIL_PHY))/2
maximum of 1/8th of TOTAL_PHY and AVAIL_PHY and divided by 2. See function “default_sort_size (void)” in the code.
2. Creating Runs:
————————-
Unix sort creates a temporary file for every run. So it creates IN_SIZE/RUN_SIZE (celing) temporary files. Internally it uses merge sort to sort internally it uses an optimization mentioned in Knuth volume 3 (2nd edition), problem 5.2.4-23.
3. Merging:
—————-
The number of runs merged at any time is hard coded in the program see macro NMERGE , NMERGE is defined to be 16 so it merges exactly 16 runs at any time.”
<–End–>
rsync -avz -e “ssh -i sshkey” remoteuser@remotehost:/remote/dir /this/dir/
find . -size 20 \! -type d -exec cksum {} \; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ' ' | uniq -d | grep -hif - /tmp/f.tmp > dup.txt
Following is a way to use the crypt() command to be used in generating a password using the useradd method:
perl -e 'print crypt("password", "salt"),"\n"'
http://www.jeteye.com/jetpak/e251d8b0-3b33-1029-86c1-00304880af2f/
I installed Crossover office from Codeweavers. For server work, I always had been working on Linux; but for desktop, I had been always with windows. I am addicted to Microsoft Office. Recently, my system had been crashing a lot and I had been thinking about multiple options. I installed Linux and was looking at crossover office as one option.
I have finally was running windows over vmware. I enjoy this set up much better.
sftpdrive can be used to install an sftp drive as a drive on your system. Moreover, it also provides an ability to provide a tunneling: something that I wanted from winscp. I would love to see a tabbed putty client.
Download sftpdrive from: http://www.sftpdrive.com/