Check These Out
This is a simple command, but extremely useful. It's a quick way to search the file names in the current directory for a substring. Normally people use "ls *term*" but that requires the stars and is not case insensitive. Color (for both ls and grep) is an added bonus.
Queries the specified ethernet device for associated driver information
expr will give you a quick way to do basic math from the CLI. Make sure you escape things like * and leave a space between operators and digits.
Leave it to a proprietary software vendor to turn a cheap and easy parlor trick into a selling point. "Hey guys, why don't we turn our _collection of multiple files_ into a *collection of multiple files*!!" Extract the ^above with this:
$ cat pics.tar.gz.??? | tar xzv
^extract on any Unix - no need to install junkware!
(If you must make proprietary software, at least make it do something *new*)
if [ -e windows ]; then use 7-Zip
For mac users !
When expanding, bash output the command, so don't be affraid if you type the command.
Here is the details:
First examples:
$echo foo bar foobar barfoo
First argument:
$echo !$
echo barfoo
barfoo
(Note that typing echo foo bar foobar barfoo && echo !$, bash substitute !$ with $:1)
Last argument:
$echo foo bar foobar barfoo && echo !^
echo foo bar foobar barfoo && echo barfoo
foo bar foobar barfoo
barfoo
All the arguments:
$echo !*
echo foo bar foobar barfoo
foo bar foobar barfoo
The third argument:
$echo foo bar foobar barfoo && echo !:3
echo foo bar foobar barfoo && echo foobar
foo bar foobar barfoo
foobar
You may want to add {} for large numbers: echo !:{11} for example
Now with path:
$echo /usr/bin/foobar
/usr/bin/foobar
For the head:
$echo !$:h
echo /usr/bin
/usr/bin
And the tail:
$echo !$:t
echo foobar
foobar
You also may want to try !:h and !:t or !!3-4 for the third and the fourth (so !!:* == !!:1-$)
to include hidden dirs use:
$ tree -adL 1
(with ls, requires 'ls -ad */ .*/')