...
- find returns a list of matching file paths on its standard output
- ln wants its files listed as arguments, not on standard input
- so the paths are piped to the standard input of xargs
- xargs takes the data on its standard input and calls the specified function (here ln -sf -t .) with that data as the function's argument list.
...
Code Block | ||
---|---|---|
| ||
# copy a small.fq file into a new ~/gzips directory mkdir -p ~/gzips cp -p /stor/work/CCBB_Workshops_1/misc_data/fastq/small.fq ~/gzips/ cd ~/gzips ls -lh small.fq # small.fq is 66K (~66,000) bytes long wc -l small.fq # small.fq is 1000 lines long |
...
Code Block | ||
---|---|---|
| ||
gzip small.fq # compress the small.fq file in place, producing small.fq.gz file ls -lh small.fq.gz # small.fq.gz is only 15K bytes -- 4x smaller! |
...
Display lines 6 - 9 of the compressed "jabber.gz" text
...
title | Hint... |
---|
...
Expand | ||
---|---|---|
| ||
zcat jabber.gz | cat -n | tail +6 | head -4 |
...