Check These Out
Remounts a usb disk /dev/sdb, without having to physically remove and reinsert. (Gnome desktop)
Instead of using force un-mounting, it's better to find the processes that currently use the relevant folder.
Taken from:
http://www.linuxhowtos.org/Tips%20and%20Tricks/findprocesses.htm
-e is the script function, it performs search and replace like vi, and -i is the edit the file in place.
Sed stops parsing at the match and so is much more effecient than piping head into tail or similar. Grab a line range using
$ sed '999995,1000005!d' < my_massive_file
file(1) can print details about certain devices in the /dev/ directory (block devices in this example). This helped me to know at a glance the location and revision of my bootloader, UUIDs, filesystem status, which partitions were primaries / logicals, etc.. without running several commands.
See also:
$ file -s /dev/dm-*
$ file -s /dev/cciss/*
etc..
[Click the "show sample output" link to see how to use this keystroke.]
Meta-p is one of my all time most used and most loved features of working at the command line. It's also one that surprisingly few people know about. To use it with bash (actually in any readline application), you'll need to add a couple lines to your .inputrc then have bash reread the .inputrc using the bind command:
$ echo '"\en": history-search-forward' >> ~/.inputrc
$ echo '"\ep": history-search-backward' >> ~/.inputrc
$ bind -f ~/.inputrc
I first learned about this feature in tcsh. When I switched over to bash about fifteen years ago, I had assumed I'd prefer ^R to search in reverse. Intuitively ^R seemed better since you could search for an argument instead of a command. I think that, like using a microkernel for the Hurd, it sounded so obviously right fifteen years ago, but that was only because the older way had benefits we hadn't known about.
I think many of you who use the command line as much as I do know that we can just be thinking about what results we want and our fingers will start typing the commands needed. I assume it's some sort of parallel processing going on with the linguistic part of the brain. Unfortunately, that parallelism doesn't seem to work (at least for me) with searching the history. I realize I can save myself typing using the history shortly after my fingers have already started "speaking". But, when I hit ^R in Bash, everything I've already typed gets ignored and I have to stop and think again about what I was doing. It's a small bump in the road but it can be annoying, especially for long-time command line users. Usually M-p is exactly what I need to save myself time and trouble.
If you use the command line a lot, please give Meta-p a try. You may be surprised how it frees your brain to process more smoothly in parallel. (Or maybe it won't. Post here and let me know either way. ☺)