×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

(Useful) Stupid Vim Tricks?

Isomer Re:= and * (702 comments)

* and # are pretty cool, but for vim so is [i and [^i (show the first occurance of the keyword under the cursor in the minibuffer, recursing through #includes, and ^i is "jump to"). Also ^Wi for opening it in a new window.

more than 6 years ago
top

(Useful) Stupid Unix Tricks?

Isomer Re:Show attached block devices (2362 comments)

For your system you have to remember their history numbers, and it's a lot more typing. Up arrow or ^R to search for it, then just keep hitting ^O, you don't even have to hit enter.

more than 6 years ago
top

(Useful) Stupid Unix Tricks?

Isomer My Favourite commands (strace, tcpdump, and so on) (2362 comments)

strace: Finding out why that program is failing with an error, but not explaining what the error is about. For example if your program dies with "Not such file or directory" but doesn't say what it was trying to find, strace will generally show a syscall near the end that failed with -ENOENT. strace is also useful for finding out where on earth this program has decided to log.

tcpdump: Watching what networking a program is doing. Often useful for figuring out why packets aren't going where you expect, or if it's the local or remote machine that's having problems.

gdb/valgrind: Both are useful for looking at why a program crashes.

if strace isn't verbose enough, theres also ltrace, which can show you how a program is interacting with a specific (or all) libraries.

more than 6 years ago
top

(Useful) Stupid Unix Tricks?

Isomer Re:cd - (2362 comments)

Also, you can use ~-/ too to refer to the previous directory. So:
cd /tmp
cp ~-/foo.c .

more than 6 years ago
top

(Useful) Stupid Unix Tricks?

Isomer Re:Show attached block devices (2362 comments)

More awesomely, if you have found something in your history with ^R or up arrow or whatever, then you can press ^O to "execute this line and put the next line in the history onto the command line". Thus:
vi foo.c
make
./foo
^Rvi^O^O^O^O^O^O^O^O^O^O^O^O^O^O
and so on.

more than 6 years ago

Submissions

Isomer hasn't submitted any stories.

Journals

Isomer has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?