Commands tagged ssd (4)

  • if you still get a permissions error using sudo, then nano the file: sudo nano -w /sys/block/sdb/queue/rotational and change 1 to 0 this thread: http://www.ocztechnologyforum.com/forum/showpost.php?p=369836&postcount=15 says that this will "help the block layer to optimize a few decisions"


    5
    sudo echo 0 > /sys/block/sdb/queue/rotational
    nickleus · 2009-11-27 12:16:17 10
  • Periodically run the one-liner above if/when there are significant changes to the files in /usr/ = Before rebooting, add following to /etc/fstab : = /squashed/usr/usr.sfs /squashed/usr/ro squashfs loop,ro 0 0 usr /usr aufs udba=reval,br:/squashed/usr/rw:/squashed/usr/ro 0 0 No need to delete original /usr/ ! (unless you don't care about recovery). Also AuFS does not work with XFS


    4
    [ ! -d /squashed/usr ] && mkdir -p /squashed/usr/{ro,rw} ; mksquashfs /usr /squashed/usr/usr.sfs.new -b 65536 ; mv /squashed/usr/usr.sfs.new /squashed/usr/usr.sfs ; reboot
    mhs · 2014-05-10 06:01:06 9
  • To get most of you HDD/SSD driver you need to make sure you partition are aligned, if not the speed penalty can be up to 50% slower! this simple one liner will check to see if each partition start sector is divided by 512 you need to change sda with your driver if you find the one of your partitions is not aligned use gparted to move the start sector of the partition to be divided of 512 Show Sample Output


    1
    fdisk -l /dev/sda | grep -E sda[0-9]+ | sed s/*// | awk '{printf ("%s %f ",$1,$2/512); if($2%512){ print "BAD" }else {print "Good"} }' | column -t
    The_IceMan_Blog · 2012-05-18 08:34:36 5
  • Check SATA controller type. 6.0 Gbps - SATA III 3.0 Gbps - SATA II 1.5 Gbps - SATA I Show Sample Output


    1
    dmesg | grep -i sata | grep 'link up'
    FadeMind · 2013-04-18 15:41:33 8

What's this?

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.

Share Your Commands


Check These Out

Change every instance of OLD to NEW in file FILE
Very quick way to change a word in a file. I use it all the time to change variable names in my PHP scripts (sed -i 's/$oldvar/$newvar/g' index.php)

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

easily strace all your apache processes
This one-liner will use strace to attach to all of the currently running apache processes output and piped from the initial "ps auxw" command into some awk.

Top 10 Memory Processes (reduced output to applications and %usage only)
Top 10 Memory Processes (reduced output to applications and %usage only)

Convert a flv video file to avi using mencoder

Rename files in batch

connects to a serial console
cu (call UNIX) establishes a full-duplex connection to another machine (*BSD) using a serial console. It becames more useful than screen if you have to send a BREAK signal. using cu just type "~#". $man cu http://www.openbsd.org/cgi-bin/man.cgi?query=cu&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html

Convert numbers to SI notation
converts any number on the 'stdin' to SI notation. My version limits to 3 digits of precious (working with 10% resistors).

Find the package that installed a command

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: