Command Line Magic

@climagic

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

BASHLAND
Inscrit en novembre 2009

@climagic est bloqué

Êtes-vous sûr de vouloir voir ces Tweets ? Voir les Tweets ne débloquera pas @climagic.

  1. Don't do something for your predecesors, learn from them and do something for your decendants.

  2. curl -N --limit-rate 16K http://f.climagic\.org/techsup.mp3 | mpg123 - # Stream mp3 at bitrate speed (128Kbits). WARNING: NSFW "lyrics"

  3. Nullaphobia - The fear of what might be happening after you start to run a command and don't see output immediately. ie. rm -fr *

  4. egrep -wo "(Donnie|Frank|Roberta|Grandma)" story.txt |sort|uniq -c|sort -r # Search for names and build a frequency count for each name.

  5. df -lP |awk '{sum += $3} END {printf "%d GiB\n", sum/2**20}' # Show the total space used on all your local disk partitions.

  6. for dir in */ ; do echo "${dir%/}" ; done # Use the */ trick to get only the directories, then use ${dir%/} to remove the trailing / you get

  7. grep -P -o '(?<=href=")http:\S+(?=")' *.html # Use perl regex (negative look-behind/look-ahead assertions) to get URLs.

  8. convert -size 1280x720 plasma:green-blue background.png # Create a 1280x720 color plasma image. Different each time. Uses ImageMagick

  9. strings /dev/urandom | tr -c -d '0-9' | dd of=randomnumbers.txt bs=1 count=1M # Write 1MB (1048576) of random numbers to a file.

  10. When confronted with new things, I first scoff at it. Then I scoff again. Then I try it. Then I use it. Then I defend it as a way of life.

  11. sed "/bang/ s/foo/bar/" # Replace foo with bar only on lines that contain 'bang'. Use in pipeline or with file args. Thanks

  12. Server: nc -l 8762 < video.mpg Client: nc server 8762 | mplayer -cache 1000 - # Poor man's video streaming service at video bitrate.

  13. ssh -t user1@server1 'ssh -t user2@server2 "ssh -t user3@server3"' # After all the host keys and auth, you'll be on server3.

  14. rig # rig is this cool little program that generates random identities.

  15. climagic t-shirts are available to show everyone you have shell skills.

  16. play -n synth pl G2 pl B2 pl D3 pl G3 pl D4 pl G4 delay 0 .05 .1 .15 .2 .25 remix - fade 0 4 .1 norm -1 # Guitar strum. play is from sox pkg

  17. Command Line Magic s'est abonné , , et 17 autres
    • @kramse

      internet samurai - retweeting is not always agreement. Private tweet roll - may offend sometimes. PGP Key: 6851 0A6C 3171 9FE5 3C51 C6D6 EFDC 8A02 C88D 08EB

    • @tr0e1s

      Trust your technolust

  18. # Climagic video - Aliases vs Functions and where to use $1.

  19. sudo shutdown -h 60 & mpg123 ambientmusic/*.mp3 # Play music for 60 minutes and then shutdown. Like sleep on alarm clock.

  20. less +F filename.log # Using +F option or pressing F in less is similar to `tail -f filename.log` but can use less's features. Thx

Le chargement semble prendre du temps.

Twitter est peut-être en surcapacité ou rencontre momentanément un incident. Réessayez ou visitez l'État de Twitter pour plus d'informations.

    Vous aimerez peut-être aussi

    ·