Skip to content

Instantly share code, notes, and snippets.

Created February 28, 2016 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/44d9815f05b0e93b4169 to your computer and use it in GitHub Desktop.
Save anonymous/44d9815f05b0e93b4169 to your computer and use it in GitHub Desktop.
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ cat /dev/urandom|tr -dc "a-zA-Z0-9 " > text
^C
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ ll 130 :(
total 62M
drwx------ 2 akurei akurei 140 Feb 28 18:09 .
drwxrwxrwt 13 root root 440 Feb 28 18:08 ..
-rwxrwx--x 1 akurei akurei 7.6K Feb 28 18:00 rot13
-rw-r----- 1 akurei akurei 1.3K Feb 28 18:00 rot13.c
-rwxrwx--x 1 akurei akurei 9.5K Feb 28 18:00 rot13_old
-rw-r----- 1 akurei akurei 5.4K Feb 28 17:59 rot13_old.c
-rw-rw---- 1 akurei akurei 62M Feb 28 18:09 text
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ truncate -s 50M text
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ ll
total 51M
drwx------ 2 akurei akurei 140 Feb 28 18:09 .
drwxrwxrwt 13 root root 440 Feb 28 18:08 ..
-rwxrwx--x 1 akurei akurei 7.6K Feb 28 18:00 rot13
-rw-r----- 1 akurei akurei 1.3K Feb 28 18:00 rot13.c
-rwxrwx--x 1 akurei akurei 9.5K Feb 28 18:00 rot13_old
-rw-r----- 1 akurei akurei 5.4K Feb 28 17:59 rot13_old.c
-rw-rw---- 1 akurei akurei 50M Feb 28 18:09 text
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ time cat text | ./rot13_old > /dev/null
cat text 0.03s user 0.00s system 0% cpu 3.820 total
./rot13_old > /dev/null 3.81s user 0.02s system 99% cpu 3.826 total
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ time cat text | ./rot13 > /dev/null
cat text 0.02s user 0.00s system 2% cpu 1.076 total
./rot13 > /dev/null 1.05s user 0.02s system 99% cpu 1.077 total
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ time cat text | ./rot13_old > /dev/null
cat text 0.03s user 0.00s system 0% cpu 3.884 total
./rot13_old > /dev/null 3.86s user 0.02s system 99% cpu 3.888 total
akurei@pantalaimon: /tmp/tmp.OkudWaIV2M $ time cat text | ./rot13 > /dev/null
cat text 0.03s user 0.00s system 2% cpu 1.097 total
./rot13 > /dev/null 1.08s user 0.02s system 99% cpu 1.098 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment