Identi.ca Identi.ca
  • Login
  • Public

    • Public
    • Groups
    • Featured
    • Popular
    • Directory

Command Line Magic (climagic)

  1. Command Line Magic Command Line Magic

    awk '{t=substr($0,22);if (l!=t){print $0}; l=t}' log # Only print lines where things that matter change, ignoring the timestamp (first 21)

    about an hour ago from Net::Twitter
  2. Command Line Magic Command Line Magic

    pianobar # Pandora music client for the command line. And like many CLI clients, it actually has more control and features. ;-)

    about 3 hours ago from Net::Twitter
  3. Command Line Magic Command Line Magic

    xrandr -q # This is one of the ways to figure out what screen resolution X windows is in from the command line. xrandr can switch res too.

    about 18 hours ago from Net::Twitter
  4. Command Line Magic Command Line Magic

    last -da | grep pts/ | egrep -v "^(user1|user2) " # Look at all the last interactive logins (no ftp) and also exclude user1 and user2

    about 20 hours ago from Net::Twitter
  5. Command Line Magic Command Line Magic

    fdisk -l /dev/sd? # If you're on a system with device mapper devices that also list when you run fdisk -l, try this match for brevity.

    about 22 hours ago from Net::Twitter
  6. Command Line Magic Command Line Magic

    sed '/^$/d' prog.c > proc-condensed.c # (over)write prog-condensed.c with the non-blank lines in prog.c. For @Jayantshobhawat

    about a day ago from Net::Twitter
  7. Command Line Magic Command Line Magic

    tr -d $'\n' # Remove the trailing newline(s) from its input. If you like the chop/chomp command in Perl or PHP, this is for you.

    about a day ago from Net::Twitter
  8. Command Line Magic Command Line Magic

    nohup serverprocess # Poorly written server software can benefit from nohup by detaching from your shell so you can exit cleanly.

    about a day ago from Net::Twitter
  9. Command Line Magic Command Line Magic

    egrep -e "ROOM1? " /var/log/cups/access_log # Search for printers called ROOM or ROOM1 in the cups access log. Won't match ROOM2, 3, etc.

    about a day ago from Net::Twitter
  10. Command Line Magic Command Line Magic

    Some people worry about losing hair, hearing or sight with age. I worry about forgetting which window I'm in when I press enter. Whoops

    about 2 days ago from Net::Twitter
  11. Command Line Magic Command Line Magic

    umask 077 # Set your default file and directory permissions to 600 and 700 respectively. Good to do in scripts, especially running as root.

    about 2 days ago from Net::Twitter
  12. Command Line Magic Command Line Magic

    A watched pot never boils; The same is true for a broken service running in debug mode.

    about 2 days ago from Net::Twitter
  13. Command Line Magic Command Line Magic

    find . -name '*.php' -type f -print0 | xargs -0 wc -l | grep total # Get a rough idea of how many lines of code are in a PHP app.

    about 2 days ago from Net::Twitter
  14. Command Line Magic Command Line Magic

    ssh -g -L 8025:smtp.otherisp.net:25 http://ur1.ca/8ahod # Setup SMTP tunnel (listening on yourhost:8025) and allow others to use it (-g)

    about 2 days ago from Net::Twitter
  15. Command Line Magic Command Line Magic

    mkdir -p Maildir/{new,cur,tmp} # Create a Maildir folder with its subdirs all at once. -p option creates parent dirs if they don't exist.

    about 2 days ago from Net::Twitter
  16. Command Line Magic Command Line Magic

    df -i # Show the number of inodes used on each filesystem (some don't report this). Useful for quickly determining how many files you have.

    about 2 days ago from Net::Twitter
  17. Command Line Magic Command Line Magic

    http://ur1.ca/89yuu # It had to be made.

    about 3 days ago from Net::Twitter
  18. Command Line Magic Command Line Magic

    awk '{print substr($4,0,17)}' access_log |uniq -c # Print number of hits for each 10 minutes in a CLF webserver log file to find spikes.

    about 3 days ago from Net::Twitter
  19. Command Line Magic Command Line Magic

    awk 'NR>1' datawithheader.csv # Start processing in awk with the second line of input. Useful for skipping headers. Thx @davidmaxwaterma

    about 3 days ago from Net::Twitter
  20. Command Line Magic Command Line Magic

    Consultant just said "I got the blue circle of death. That's what I call it, what do you call it?" Me: "Windows. I use Linux."

    about 3 days ago from Net::Twitter
  • Before

User actions

  • Subscribe
  • List
Command Line Magic

Command Line Magic

BASH

http://suso.suso.org/xulu/Command_Line_Magic

Cool Unix/Linux Command Line tricks you can use in 140 characters or less.

Tags
  • #aix
  • #bash
  • #cli
  • #comedy
  • #commandline
  • #csh
  • #funny
  • #linux
  • #opensource
  • #oss
  • #osx
  • #popular
  • #programming
  • #puzzles
  • #sysadmin
  • #unix
  • #zsh

Site notice

  • API
  • Lockouts explained
  • Search fixed

Following 304

  • Захария Стургин redxine
  • synaesthesin synaesthesin
  • Neil Hodges takeshitakenji
  • Moose Foinbrek foinbrek
  • Sylvain Carle afroginthevalley
  • Hex hex
  • John Sullivan johnsu01
  • Henry Poole poole

Followers 541

  • Pierre Ghazarian pierreghz
  • Olivier tyldurd
  • John Abbott jla
  • Red redoctober6
  • Chris Topher piks3l
  • Guillaume Mazoyer gmazoyer
  • rizitis rizitis
  • nm nm

Groups 13

  • GNU's Not Unix gnu
  • Mac Users mac
  • Linux linux
  • Mac OS X macosx
  • The FreeBSD Project freebsd
  • Fedora users fedora
  • The Unix Operating Systems unix
  • A webcomic of romance, sarcasm, math, and language xkcd

Lists 19

    puzzles , comedy , funny , popular , oss , opensource , cli , commandline , osx , aix , programming , sysadmin , unix , linux , csh , zsh , bash , line , command

Statistics

User ID
110051
Member since
18 Dec 2009
Notices
2875
Daily average
4

Feeds

  • Activity Streams
  • RSS 1.0
  • RSS 2.0
  • Atom
  • FOAF
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Identi.ca is a microblogging service brought to you by Status.net. It runs the StatusNet microblogging software, version 1.0.1, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Identi.ca content and data are available under the Creative Commons Attribution 3.0 license.

Switch to mobile site layout.

Built in Montreal