Question: I have used Android phonegap application for creating dynamic list with label and corresponding values for that label one by one (e.g. label: 'A', values: Arun, Amala, Aruna up to 'Z') and there are alphabets in side of the page.

Now I want that when I am clicking alphabet ('A') the list automatically show the label ('A') with values, if it is 'B' show that label ('B') with values without modifying the list.

While I am clicking 'A', how to get current position of label ('A') and move the cursor to that postion show the label ('A') with values?

My code: I have retrive value from local database,below code is for dynamic list Script:

```
function querySuccess(tx,results)
{

 $('.sidemenu').append("<label style='background-color:#C1CDD9'   align='left'>"+results.rows.item(i).alphabet + "</label>"+"<br/>");
for (i = 0; i < results.rows.length; i++) 
                {

 $(".sidemenu").append("<li  id='list' >"+"<a id='link'  href='#'>" +results.rows.item(i).name +  "</a>"+ "<br/>"+ "</li>");
 }

```

html

```
<ul class="sidemenu" ></ul>

```

My dynamiclist like:

```
label-A

```

Arun
Aruna
Amala
label-B
Bala
bhuvana

Answer: 
Based on Jan-Philip Gehrcke's response:

```
find . -type f -size -1024k -print0 | tar -czf --null -T - -f archive.tar.gz

```

for files less than 1M. Tested on OS X and Ubuntu Linux.
The `...| tar c --null -T -` solution above is the best if you have adequate memory (i.e. the file list fits into your memory easily (in most cases, this is true)). However, xargs *does* have a place if you are memory-constrained, but you have to use it appropriately so that the multiple tar invocations have no ill effect.

To compress, you may use:

```
find . -type f -size -1024k | xargs tar c | gzip > archive.tar.gz

```

This results in a file of concatenated tar archives, gzipped together into the resulting file (you may also use `cz` and omit `| gzip` as concatenating gzip archives is still valid gzip, but you lose a tiny bit of compression, or quite a bit of compression if you use bzip2 or xz instead of gzip).

To extract the resulting file you *have* to use the `--ignore-zeros` or `-i` option of tar to not only extract the first archive:

```
tar xizf archive.tar.gz

```