Preserve file structure when coping and exclude some file o dir patterns Show Sample Output
Warning!, if the pattern didn't find anything it shows the total size of dot dir Show Sample Output
A quick way of know the temperature info. Show Sample Output
If you wish to launch the kde4 screen saver without the password prompt to exit, use this command:
qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive True
Also can be done with:
/usr/lib/kde4/libexec/kscreenlocker --forcelock
This may seem like a long command, but it is great for making sure all file permissions are kept in tact. What it is doing is streaming the files in a sub-shell and then untarring them in the target directory. Please note that the -z command should not be used for local files and no perfomance increase will be visible as overhead processing (CPU) will be evident, and will slow down the copy.
You also may keep simple with, but you don't have the progress info:
cp -rpf /some/directory /other/path
Show Sample Output
You set the file/dirname transfer variable, in the end point you set the path destination, this command uses pipe view to show progress, compress the file outut and takes account to change the ssh cipher. Support dirnames with spaces. Merged ideas and comments by http://www.commandlinefu.com/commands/view/4379/copy-working-directory-and-compress-it-on-the-fly-while-showing-progress and http://www.commandlinefu.com/commands/view/3177/move-a-lot-of-files-over-ssh Show Sample Output
Before doing this, back-up all data on any ext3 partitions that are to be converted to ext4.
After running previous command you MUST run fsck, is needed to return the filesystem to a consistent state.
fsck -pDf /dev/yourpartition
Edit /etc/fstab and change the 'type' from ext3 to ext4 for any partitions that are converted to ext4.
Thankfully, the ssh command allows you to specify multiple tunnels through the same server in one command. Remeber if you want a priviliged port on your machine, you must use root or sudo account. Show Sample Output
* size must be 640?480 pixels * only has 14 colors * save it in XPM format Edit /boot/grub/menu.lst and add splashimage=(hd0,0)/boot/grub/grubimg.xpm make sure for your path name and hard disk
You also can sum the file usage of all files
find /usr/lib -maxdepth 1 -type l -print0 | xargs -r0 du -Lch
First you have to create a directory in your system, where the fonts will be stored, and copy them.
sudo mkdir /usr/share/fonts/miscttf; sudo cp *.ttf /usr/share/fonts/miscttf
After recharge cache with the command
Useful if you want get all the md5sum of files but you want exclude some directories. If your list of files is short you can make in one command as follow:
find . -type d \( -name DIR1 -o -name DIR2 \) -prune -o -type f -exec md5sum {} \;
Alternatively you can specify a different command to be executed on the resulting files.
You can exclude more system folders or individual files which are not necessary for the backup and can be recreated after the restore procedure, like /lost+found, /mnt, /media, /tmp, /usr ...
Restoring the above backup procedure is as simple as becoming root and typing:
tar zxpf backup.tgz -C /
You can extract any file or directory out of the backup.tgz file for recovery, for instance, if you have a corrupt or mis-configured fstab file, you could simply issue the command:
tar zxpf backup.tgz /ect/fstab -C /
Other options:
v add verbose option to see files processed
A far safer solution is to restore the desired files under a different directory, and then compare, move, or update the files to their original locations afterward.
Using the redundant ./ directory information prevents the dash from occurring at the beginning of the filename, and being interpreted as an option of the rm command.
Also works using:
rm -- -filename
Show Sample Output
(WARN) This will absolutely not work on all systems, unless you're running large, high speed, hardware RAID arrays. For example, systems using Dell PERC 5/i SAS/SATA arrays. If you have a hardware RAID array, try it. It certainly wont hurt.
You may be can test the speed disk with some large file in your system, before and after using this:
time dd if=/tmp/disk.iso of=/dev/null bs=256k
To know the value of block device parameter known as readahead.
blockdev --getra /dev/sdb
And set the a value 1024, 2048, 4096, 8192, and maybe 16384... it really depends on the number of hard disks, their speed, your RAID controller, etc. (see sample)
Show Sample Output
This command would be useful when it is desirable to list only the directories.
Other options
Hidden directory
ls -d .*/
Other path
ls -d /path/to/top/directory/.*/
Long format:
ls -ld */
Show Sample Output
Where < target > may be a single IP, a hostname or a subnet
-sS TCP SYN scanning (also known as half-open, or stealth scanning)
-P0 option allows you to switch off ICMP pings.
-sV option enables version detection
-O flag attempt to identify the remote operating system
Other option:
-A option enables both OS fingerprinting and version detection
-v use -v twice for more verbosity.
nmap -sS -P0 -A -v < target >
You can convert a FAT or FAT32 volume to an NTFS volume without formatting the drive, though it is still a good idea to back up your data before you convert.
Dashboard is OS X utility application. When you hit F12, Dashboard springs forward, dimming the background, some people have claimed memory or performance problems. In my case, I just don't use it, there may be other reasons you?d rather not have Dashboard available. Change YES to NO to restore the previous functionality.
-p parameter tells wget to include all files, including images. -e robots=off you don't want wget to obey by the robots.txt file -U mozilla as your browsers identity. --random-wait to let wget chose a random number of seconds to wait, avoid get into black list. Other Useful wget Parameters: --limit-rate=20k limits the rate at which it downloads files. -b continues wget after logging out. -o $HOME/wget_log.txt logs the output
-nohttpd don't run mini-httpd if VNC java applet is found -name change the name of the desktop, it's passed to xstartup script via $VNCDESKTOP, run different set of apps acording the name. -depth pixel depth in bits of the desktop, default is 16 -geometry size of the desktop, default is 1024x768
The popular fortune program telling by a cow (see sample). - fortune - cowsay Show Sample Output
That "^M" is Ctrl-M, which is a carriage return, and is not needed in Unix file systems. Where ^V is actually Ctrl-V and ^M is actually Ctrl-M (you must type these yourself, don't just copy and paste this command). ^V will not be displayed on your screen.
-p PID and name of the program -u on a UDP port. -t also TCP ports -o networking timer -n numeric IP addresses (don't resolve them) -a all sockets
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: