5 ms·
Top two are wrong… Not a good thing. It's always the same badly written snippets that get copy-pasted across websites without anyone really understanding what
by l-p 14y ago
Top two are wrong… Not a good thing.
It's always the same badly written snippets that get copy-pasted across websites without anyone really understanding what it does (hence the copy/paste).
> alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"
python -m SimpleHTTPServer # python 3
python -m http.server # Python 3
> extract () { /* useless stuff */ }
tar xf
- benjy1 14y agoWe only launched this morning so they're all very new. We do have a voting feature on the full page view so we're hoping the poorer aliases sink over time. We also intend to make the voting more prominent.
- dschep 14y agoI think you mean Python 2 for the SimpleHTTPServer example.
- benjy1 14y agopython one works fine for me. I tried tar xf on a zip file and it didn't work?
- qu4z-2 14y agotar xf doesn't work on zip, rar, 7z, or plain compressed files (ie log.gz instead of log.tar.gz) Additionally I prefer "verb noun" form over "program noun", so I like extract. I already alias open=xdg-open (so I can type "open somefile.pdf" or "open somefile.doc", etc)
- Despite 14y agoThere are versions of tar (that I have to use) which don't autodetect the compression type. And that alias includes non-tar filetypes.