Live Chat!

smart grouping shorten long command line 2

* * * * * 1 votos

June 19th, 2007 mysurface

This post is to illustrate additional usage of curly brackets { } for range of numbers, continues from smart grouping shorten long command line.
Let say you have a list of logs where you want to pick a range of logs for analysis, the sample log files shows as bellow

tcp_06062007_1.txt

tcp_06062007_180.txt
tcp_06062007_181.txt
tcp_06062007_182.txt

tcp_06062007_230.txt
In order to archive logs from range [...]

Posted in Symbol, curly brackets, tar | Hits: 23774 | No Comments »

smart grouping shorten long command line

* * * * * 1 votos

August 25th, 2006 mysurface

Let say you want to copy certain files from a directory to current directory, which the parent path is long, how the command will looks like?
cp /home/foobar/downloads/one /home/foobar/downloads/two….. .
So most of the people will change directory to downloads first, then copy those files, such as
(Assume the current directory is /home/soomee/downloads )
cd /home/foobar/downloads
cp one two three [...]

Posted in Symbol, curly brackets | Hits: 6705 | 4 Comments »