3 ms·
My most obscure cool one liner... 1. Pointing your webserver to your current directory. Simplifies copying files to your local box. The simple python 3.
by iblaine 6y ago
My most obscure cool one liner...
1. Pointing your webserver to your current directory. Simplifies copying files to your local box.
The simple python 3.x way...
python -m http.server 8001
And the original way I used to do it...
function sfiles() { x=`ipconfig getifaddr en0`;echo $x:8001;ruby -run -ehttpd . -p8001; }
And please use this with *extreme* caution because any files you've got access to on your remote box will have no authentication when they're exposed via HTTP.
My most frequently used one liner...
2. Regex searching files in directories.
grep -inR <keyword> *
The Silver Searcher, aka ag, is better but not natively installed so...