Linux Tips: Difference between revisions
No edit summary |
|||
Line 21: | Line 21: | ||
sync # Flush file system buffers |
sync # Flush file system buffers |
||
</source> |
</source> |
||
⚫ | |||
⚫ | |||
== Fast Search == |
== Fast Search == |
||
=== Locate === |
|||
'''{{red|! Power Tip !}}''' Use '''<tt>locate</tt>''' to find files rapidly by their names. <tt>locate</tt> is very lightweight (hardly notice it's running) and very efficient. It works for any file in any local file system. |
'''{{red|! Power Tip !}}''' Use '''<tt>locate</tt>''' to find files rapidly by their names. <tt>locate</tt> is very lightweight (hardly notice it's running) and very efficient. It works for any file in any local file system. |
||
=== Recoll, Beagle, Google Desktop... === |
|||
See [[Linux Software]] for more powerful search tool (searching in file content). |
|||
⚫ | |||
⚫ | |||
== Password prompt during boot == |
== Password prompt during boot == |
Revision as of 09:47, 17 January 2011
Disable Auto-Mount
You can temporarily disable automount by doing as root [1]:
$ rcdbus stop
Fast Copy
Using Netcat
When copying a directory that contains a lot of small files (like 1000+ files <1kB), it is faster to actually generate a tarball of the directory and have it unpacked on the fly on the destination server [2]:
# On DESTINATION box, launch first the listener
nc -l -p 2342 | tar -C /target/dir -xzf -
#On SOURCE box, launch the sender
tar -cz /source/dir | nc Target_Box 2342
Using tar
Say you want to copy from directory /mnt/img to /mnt/usb
(cd /mnt/img ; tar -cf - *) | (cd /mnt/usb ; tar -xvf -)
sync # Flush file system buffers
Other
See here
Fast Search
Locate
! Power Tip ! Use locate to find files rapidly by their names. locate is very lightweight (hardly notice it's running) and very efficient. It works for any file in any local file system.
Recoll, Beagle, Google Desktop...
See Linux Software for more powerful search tool (searching in file content).
Password prompt during boot
This is a tip for GDM but similar tip works for KDM. It prompts for a password needed to mount a password protected HOME partition [3].
Add at the end of /etc/gdm/Init/Default:
DEVICE=/dev/sda6
while [ ! -e /dev/mapper/cryptohome ]; do
zenity --entry --hide-text --text="Enter your passphrase:" | cryptsetup luksOpen $DEVICE cryptohome
done
mount /dev/mapper/cryptohome /home