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

You have ten seconds to explain why a pure CLI is more efficient

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 105
Thread images: 11

File: 1467734584757s.jpg (11KB, 250x210px) Image search: [Google]
1467734584757s.jpg
11KB, 250x210px
You have ten seconds to explain why a pure CLI is more efficient than a file manager (Thunar, etc) for moving, copying, and organizing files.

>You won't
>>
>>57110209
dumb emoji anime poster
>>
>>57110219
"ree"
>>
rm $(ls | grep anime)
>>
>>57110280
find . -iname \*anime\* -delete
>>
>>57110209
Mass moving/copying/organizing, or automizing it
The only reason to use a graphical file manager is if you're working with graphical files
>>
>>57110209
>You have ten seconds to explain why a pure CLI is more efficient than a file manager (Thunar, etc) for moving, copying, and organizing files.
>>You won't

I find ranger more effective for going to folders which require root as a CLI fIle manager makes the chance of error lower for me.
As for everything else, dolphin.
>>
It may not be for what you can do in a graphical file manager, but there is so much graphical managers simply do not yet do.
>>
>>57110475
You can select large numbers of files and move them to a completely different directory in a fewer number of seconds than using CLI. Prove me wrong f a m
>>
>>57110489
>what is ctrl-a, ctrl-x, and ctrl-v
>>
>>57110541
>open giant directory of files
>only want *.(extension) files moved or deleted

With GUI:
>have to click "search" and type *.extension
>wait for it to load, couple seconds at least
>click first file
>shift click to last file
>ctrl x
>open the other directory
>paste

With CLI:
>type "mv *.(extension) /path/to/directory/.

Wow, that was hard.
>>
>>57110571
Ok. Now try moving a bunch of files that do not have a common pattern in their file name.
>>
File: zM8bmMY.jpg (26KB, 500x422px)
zM8bmMY.jpg
26KB, 500x422px
>>57110541
Cool, that doesn't even make sense. You're so stupid, and missed the point so fully, that you have succeeded in making a post that is not only not right, it's not even wrong.
>>
>>57110571
>Group by type in Windows 7, an OS from many years ago
>Select desired group
>Ctrl x
>Other directory, ctrl v

Loonix prolly can't do this tho lol
>>
>>57110612
Well of course it can't, it's a kernel.
>>
>>57110580
Cool, now try not to be retarded with your filenames. If they are related they either have a naming pattern or are in a directory. Example: Every file in my latex projects is in a directory named after the project, every note I have to a topic is named after the topic and date it was taken
>>
>>57110622
>I have no argument, so I'll just intentionally misinterpret an irrelevant semantic detail

>Gee why does everyone think Linux users are just a bunch of terminally butthurt neckbeards
>>
>>57110640
Ok, let's say you are trying to take photos out of your camera.

The files are of the form YYYY-MM-DD-HH-MM-SS.jpg. You took 50 pictures on one day, and want to collect 30 of them to put on a website. There is no relationship between the time of day the picture was taken and whether you want them or not. How would you move the 30 pictures using the command line?
>>
File: 1429177114622.jpg (12KB, 258x245px) Image search: [Google]
1429177114622.jpg
12KB, 258x245px
>>57110640
>y-you n-need a p-p-pattern in f-f-filenames
>I-I s-ss-sw-ear C-c-c-c-c-c-c-li is -b-b-b-eetter
>>
>>57110642
Are you okay?
>>
>>57110661
Are you retarded?
>type "mv *.(extension) /path/to/directory/.

In this case, extension is jpg
>>
>>57110684
Okay so you'd say "mv *.jpg /directory/"

What's the problem?
>>
>>57110684
>answering what the poster wasn't asking

wew
>>
>>57110209
clearly you're not a gentoo wizard btfo
>>
>itt: moving goal posts the thread
remember to sage bait threads kids
>>
>>57110696
Now you have 20 other files you don't want in that directory. How will you get rid of them?
>>
File: 1361832765750.png (2MB, 506x2983px) Image search: [Google]
1361832765750.png
2MB, 506x2983px
>>57110743
>open emacs
>M-x fired
>???
>files are exactly the way I want them
>>
>>57110883
And emacs magically knows which files you want and which you don't want?
>>
Depends on what you want to do.
If you want to automate file management, a CLI is your best bet. If you want to do specific, filter based movement, or moving large amounts of files, CLI is better again.
If you just want to move a sporadic file around (which is most domestic usage, hell it's most of what I do) GUI is superior.
>>
I use both.
Copying files from say a USB drive is much easier for me to just copy to the directory I need.
1. I only need to have a single window open.
2. I can auto complete the path and store paths in variables.
3. I can make it execute something exactly after it is finished copying.

However, moving to the USB drive is a bit different. It is usually as the uuid or something, so I usually just click on the icon to go there.

This is why dolphin is so good.
You have the best of both worlds.
You have the file manager that makes certain things easy and a terminal that follows the file manager as you use it.
>>
>>57110663
>my filenames don't have extensions
>I don't know how to use file(1) when they don't
>I stutter and post maymay frogs
sad life
>>
>>57110661
That's pretty much the only thing where a GUI comes in handy. Also if you're serious 'bout taking pictures, you have a DSLR which means that you should do post processing, which means you need specific software, which also handles the file management.

Give me one example where the daily fs related tasks of a sysadmin can be executed faster through a GUI than CLI.
>>
>>57110909
No, but vim has a plugin that can do that
>>
>>57110661
mv YYYY-MM-DD* /other/directory
>>
File: 1468322230825.jpg (121KB, 514x1109px) Image search: [Google]
1468322230825.jpg
121KB, 514x1109px
>>57110209
Thunar is crap. Try CPmanFM you dumb xfce poster.
>>
>>57110475
What can you do in a CLI that is so uber?
Outside of communicating with programs that only understand CLI
>>
>>57110642

Stupidity the post
>>
>>57111004
>2. I can auto complete the path and store paths in variables.
In GUI you don't need to auto complete.
>>
>>57112392
it's much faster once you really get proficient with it
globbing is very powerful, and you can do things like >>57110280
>>
>>57110209
>You have ten seconds to explain why a pure CLI is more efficient than a file manager (Thunar, etc) for moving, copying, and organizing files.

1) regex filename pattern matching
2) bulk operations
3) recursive operations (see >>57110291)

/thread
>>
>>57112458
alright, anon, go to C:\Windows\System32\Drivers
on CLI it's cd C:\Wi<tab>Sys<tab>Dri<tab>
on CLI you just type away for a second, on GUI you have to scan the whole folder visually till you find the right folder, which takes ~1s
>>
>not using both
how dumb are you?

GUI
>Can see and identify the files in the directory easily using thumbnails and logos (don't have to open / do `file *`) much quicker
>Can copy non-related files easily
>Can track progress when moving files (can't when using mv or cp)
>No unexpected behaviour, asks you wether you want to merge directories, replace files, etc.

CLI
>Globs
>Recursive operations
>Regexs
>Much faster
>Auto completion
>>
>>57113306
you can do all of this in many gui file managers anon, for instance xyplorer has all of these out of the box.
>>
>>57113441
Yeah, but not as easily.
Knowing your way around the CL is much more fficient
>>
>>57113441
You also know what has this out of the box? Bash and PowerShell.
>>
>>57113439
/thread

I use the CLI mostly because you don't have to move your hands between the keyboard and mouse so I can very quickly search for files. They open with whatever application I ask them to.

However, if I'm dealing with pictures or video I can very quickly type `thunar .`, perform a few actions then shift+meta+c to close the window.

It's perfect desu
>>
>>57110209
>can use grep, awk and sed
>have rsync
>typing ls, mv, cp with tab complete is easier than pointing, clicking and dragging
>don't have to navigate context menus
>you can set up aliases
>>
>>57110640
>Cool, now try not to be retarded with your filenames.

aka, you can't do it. good job proving your superiority
>>
File: download (1).jpg (81KB, 588x430px)
download (1).jpg
81KB, 588x430px
>>57113354
Listen anon sanpai its not like I have a CLI allergy (most of the GUI faggots have it) I learned to use the CLI and don't have a problem with it.
I love to learn things that make me more productive even if they take time and are difficult.

The problem is I don't see this with the CLI every single argument pro CLI looks ridicules like someone trying to advertise snail mail over e-mail.
>Oh you need to turn on the computer
>And like update browsers
>Wait for it to load
>While in the post office you give your mail and its all over

https://www.youtube.com/watch?v=mO_jb6BbUYw

You can smell the bullshit.

Let me demonstrate:
>alright, anon, go to C:\Windows\System32\Drivers
>on CLI it's cd C:\Wi<tab>Sys<tab>Dri<tab>
OK
on modern GUI
C:\
Press on they keyboard
Wi[ENTER]
Press on they keyboard
sys[ENTER]
Press on they keyboard
Dri[ENTER]

So the process looks like this

C:\Wi[ENTER]sys[ENTER]Dri[ENTER

Its exactly the same number of steps and in addiction you get to have everything displayed graphically so you can see files and folders.

Yes if someone is a idiot and only uses the muse he is a idiot (in addiction remember you CTRL+c/v/x) however for a power user its not a problem.

Your scenario amuses that you know what you are looking for.
In with case you are doing the same thing only in a GUI.

Fuck if you like using TAB start up cinnamon on mint and start typing in the address bar from the root its
/Wi<tab>Sys<tab>Dri<tab>
And tab completion works the same in a GUI if you have a good adders bar not some win 8 toy GUI.

--------------------
So tab completion looks the same on intelligent GUIs.
Why are you insisting on this argument?
>>
File: disgust.jpg (72KB, 1280x720px)
disgust.jpg
72KB, 1280x720px
>>57110640
>Cool, now try not to be retarded with your filenames.
>y-you're naming your files wrong!
literally "works on my machine" tier retardation here
>>
File: fire.png (765KB, 698x840px)
fire.png
765KB, 698x840px
>tfw you put spaces in your filenames
>>
File: 1252.jpg (69KB, 775x403px)
1252.jpg
69KB, 775x403px
>>57115108
{continued}

In your scenario you did know what was in the folder and the full path.

However lets say you did not know what was in your path and you searched for something, lets take the previously used path (everyone knows it)
You are on C!
>LS or DIR to see files
you think what folder it can be in by looking at the result of LS
>cd Wi<tab>
>LS or DIR to see files
you think what folder it can be in by looking at the result of LS
>cd Sys<tab>
>LS or DIR to see files
you think what folder it can be in by looking at the result of LS
>cd Dri<tab>

Congratulations you are where you wanted to be.


On a GUI its basically the same you only save on using LS all the time since it display the contents automatically.

And if you find it you simply press on it.
i use the pres beginning letters and ENTER for going into folder I know.

So the results are:
For known folders the same efficiency.
For folder searching GUI wins.

What are the benefits of CLI here?
Really present me some facts?

I love to see all the CLI brilliant tasks that are so powerfully.
For example what is a command for sorting all files (based on previews_name/creation_time) and renaming them based on a pattern?
link me so some CLI power user tutorials not CLI is better because tab completion and you use cd to change folders.
>>
>>57113489
>you don't have to move your hands between the keyboard and mouse so I can very quickly search for files.

Actually its negligible or irrelevant for me and most humans who are not anal.

>They open with whatever application I ask them to.
Translation CLI are unable to associate files with applications and I wast my time, my life and my hand typing pointless shit to open a .jpg. Somehow you are pretending this is a benefit.

And you imply GUIs can not do this.
Nothing is preventing you from dragging the file to notepad or whatever to open it. Wow how rad.

Seriously are all the CLI faggs only comparing bash to some historic relic test GUI or something? Its like these people don't know half the functions of modern GUIs after the initial tests in xerox.
>>
>>57113300
>do things like [quirky nerdy bullshit]

If you were smart and organized in the first place, you'd have organized yourself in such a fashion you'd need not tinker with a CLI :^)
>>
>>57115359
You say that as if using the CLI is inheritly worse than using a GUI. It's not.
>>
>>57115416
It is though.
>>
File: 1469134496976.jpg (19KB, 288x415px) Image search: [Google]
1469134496976.jpg
19KB, 288x415px
>>57110280
>piping ls
>>
>>57115416
It objectively takes more time to do menial tasks like looking whats inside a new USB stick.

You need to trype ls or use up arrow to get the command.

So we moved from
>CLI are superior you GUI peasant
to
>CLI and GUI are the same stop hating.
>>
>>57115482
>looking whats inside a new USB stick
if it's new it shouldn't have anything on it you silly.
>>
>>57110280
"grep -ri"
>>
>>57115545
Your friend gives you a USB stick that he filled with data.

New in this seance of the word.
>>
>>57113441
>Downloading and installing a new file manager because you need to do something in a slightly different way
>>
>>57115234
>mass renaming files easily
>mass moving files based on extention easily
>more responsive in terms of displaying information

>However lets say you did not know what was in your path and you searched for something

For what? Do I know the directoryname?

find / -type d -name "directoryimlookingfor"

Do you only vaguely remember the directoryname? Maybe you used some weird formating like .balbla_test_directory

find / -type d -name ".*_*_"

Looking for a file with a certain extension that you've recently created?

find / -type f -mtime +3 -name "*.png"

Sure Windows and linux based distros usually also have a GUI search but it will always suck in comparison with the "find" command because it can be easily finetuned and let's you even attach other commands to it. Like "find all files with this extension on the whole system and move them to a certain location" or "find all files in this subdiirectory that are older then 30 days and delete them/zip them"
>>
rm *\Fuggg\*
>>
>>57115697
whoops
find / -type d -name ".*_*_"


should be

find / -type d -name "\.*_*_"
>>
>>57115697
>mass renaming files easily
I like for you to link to a tutorial or actually show a command to do it in detail.

>mass moving files based on extension easily
1) Linux faggots are allergic to extensions so they have their hobo auto detect file type system that fails 50% of the time and insists a CBZ is a odt. Oh and not file extensions have fun in the wonderful world of linux.

2) I personally am scared of even trying to use this options.
Use it where?! On the ROOT?!!!!
you known what garbage you can get or what other files you can move?
Lets ignore the fact that no operating system has a true file extension and uses its hobo end of file name convention.

Have a prankster have a file system.mp3.driver and see what happens if you move all *.mp3

I would be extremely afraid of doing this if I don't know all files and sometimes you don't know, besides you can always use searcher *.mp3 and CTRL+A and CTRL+X

If the folder is not deep (I hope to god you are not searching ROOT) the time even of un-indexed search is instant and with indexed search it takes 1 second or less to search even ROOT.

>more responsive in terms of displaying information
I don't even know what you are even talking about here.

>However lets say you did not know what was in your path and you searched for something
Ehh look the problem is if you are remembering wrongly what the name was like you are searching musicks while the name was musixxx or some shit like this.

Besides you can use * in normal GUI searches its not like this is somehow CLI exclusive.

>find / -type f -mtime +3 -name "*.png"
This looks useful(the rest was useless shit you can do in a GUI search).
However this brings me to another point, I did practically never have the problem of finding files I have a complex and super effective foldering structure so I always find files I want.
I maximally worst case scenario need to look in 4 folders max.
It seams like you are trying to advertise to the misfiling files crowd.
>>
>>57115576
r is recursive, since the input is a stdin, that should be pointless, no?
>>
>>57115697
>"find all files with this extension on the whole system and move them to a certain location"

Insanely dangerous on ROOT and the same can be made in every GUI search *.mp3 and CTRL+A CTRL+X.

>"find all files in this subdiirectory that are older then 30 days and delete them/zip them"
Insanely dangerous on ROOT.
However I like you to show me this command since I like to use it on some folders.
I'm more interested in renaming files however show me the power of renaming in bash.
>>
>>57110209
using a file manager is basically admitting you want to be a windows user but can not afford it
>>
>>57115969
>system.mp3.driver and see what happens if you move all *.mp3
*.mp3 only matches files ending with .mp3.

>Use it where?! On the ROOT?!!!!
the / in the find tool indicates where it starts searching, so in this case the root. I used it just to be as general as possible. You can easily just pick a folder to look through, which on windows would be awful

>I would be extremely afraid of doing this if I don't know all files and sometimes you don't know, besides you can always use searcher *.mp3 and CTRL+A and CTRL+X

Afraid of doing what? If you are a newbie you have to learn how to learn using your tools. Moving all files to a certain place based on their extension is a good example. I would use find for that.

find / -type f -name "*.mp3" -exec mv {} /tmp/ \;


now let's assume I am a newbie I could just run

find / -type f -name "*.mp3" 


and it would show me the results it matches, after that I can use the command above to move them

same goes if you use regex for removing files in a directory before running "rm -f *.mp3" you can always run "ls *.mp3" and see what you "select" with your regex

>I did practically never have the problem of finding files I have

Yes you never had the problems but other people do.

>Besides you can use * in normal GUI searches its not like this is somehow CLI exclusive.

The asterisks usually works but when you start using more regex you just can't be sure anymore if the search application supports it or not. So I'd rather stick with simple tools that work the way I want them to work.
>>
>>57115234
>For example what is a command for sorting all files (based on previews_name/creation_time) and renaming them based on a pattern?
man ls
>>
>>57115234
You forgot double tab is the more efficient and the equivalent of an ls
>>
>>57115986
my bad, i didn't thought

it would be good to use it for counting with wc but for deleting it has no sense
>>
>>57116141
Funny story I have no idea how find works so I started testing it.

I create a file and serche for it.
Works.
I create a test.pm3 and the find command can not find it with
>find "*.mp3"
>>
>>57116281
find -name "*.mp3"
>>
>>57116141
>Afraid of doing what?
Garbing something you where not supposed to.
You know the bad genie wish routine you wish for something and you don't realize that it includes something else.

Let me give you a example, lets say you grab everything with a *.mp3 extension form ROOT now you are taking files from games that have .mp3 files or other programs.

Now you fucked up a lot of programs and have strange mp3 in your target.

This is a extreme example however it shows that you need to thing 8 times before you do something like this.

The question is
>Are there other mp3 that I don't want to grab?
>Do I really know that all of these mp3 are worth moving ?
>>
>>57115997
Just googling mass renaming files linux shows you enough different approaches to this "problem"
>>
>>57110209
it isn't

there are many uses for GUIs that are more efficient than their CLI counterparts

a smart user would use both
>>
>>57116141
>Yes you never had the problems but other people do.

Hobo trash people need to learn good organisation skills and not invent insane metadata like file names to hope to fined their own trash in the file system.

BTW how do you organize files on your HDD/Whatever ?
>>
>>57116339
why critique the example of course it impractical to do that system wide but knowing how to do that, the knowledge can be applied realistically
>>
>>57116228
LS can not
>renaming them based on a pattern?
The renaming part is the most important one senpai. I know how LS works.
>>
File: shaggy.jpg (8KB, 250x247px)
shaggy.jpg
8KB, 250x247px
>>57110209
You sure told us bro
>>
>>57110209
mkdir jpg
mv *.jpg jpg/
>>
>>57116402
they why ask about sorting and renaming is one pipe command away
>>
>>57116378
>Hobo trash people need to learn good organisation skills and not invent insane metadata like file names to hope to fined their own trash in the file system

For linux at least "find" shouldn't just be treated as a "i need to find files tools" it's more of a "let's select a couple of files that match my query and do something with them".
>>
>>57116330
Thanks.
BTW why did it give me results without using -name ?
>>
>>57110571
Cmd Space, *.ext, it loads instantly (spotlight database), cmd a, cmd c, cmd shift g, pa-tab, enter, cmd option v
>>
>>57115584
>seance
>a meeting at which people attempt to make contact with the dead, especially through the agency of a medium.
>>
>>57116416
>>57116433
>mkdir jpg
>mv *.jpg jpg/

You realize this can be accomplished with GUI searching and CTRL+A and CTRL+X give me something more advanced.
>>
>>57116476
Auto correct is a bitch.
>>
>>57116493
CTRL +A, switch folder CTRL +X

and CLI search is usually more reliable and modifiable, you can also append commands to your search. For an old system migration for example I wanted to backup all bash histories and known_hosts files from each user. Now try doing that with a GUI. (it's a pain in the ass), with CLI tools I can easily do that with 2 commands.

 
find -name .bash_history -exec ls -l {} \; | awk -F '\/' '{system("cp "$2 "\/"$3 " \/tmp\/bash_history_"$2)}'
find -name "known_hosts" -exec ls -l {} \; | awk -F '\/' '{system("cp "$2 "\/"$3 " \/tmp\/known_hosts_"$2)}'



>>57116437
I guess regex only works with the name switch. I never really used find without the -name switch.
>>
>>57116513
fuckoff u dumb phoneposter
>>
>>57110929
The correct answer
>>
>>57110209
Simple bulk options only a limited subset of files is much easier. Bad post OP.
>>
>>57116493
My example is efficient, that's what OP asked.
>>
>>57110571
Thunar support this for selection and potentially others too but the target directory needed to opened so maybe mc is a better choice.
>>
>>57113439
You can turn on verbose to track progress and you can turn on one option that I forgot the name of thats prompts for overwrite or merge.
>>
>>57118072
I get that, and obviously you could hack something quickly yourself
But my point is that GUI file managers have much better interaction with the user
>>
>>57115453
>want to navigate to home folder/games/whacky Pentagon
CLI
>cd ~/g(tab)wh(tab)(enter)
versus GUI
>Click start
>Wait for all the candy crush and Xbox ads to load
>Navigate mouse to my computer and click
>Double click C:\
>Double click Users
>Double click your username
>Double click games
>Scroll through all your games trying to find the right folder, takes a lil bit
>Double click whacky Pentagon
>>
>>57118916
you know you can just type w and get to whacky, right

Also
>type c
>type d
>type space
>type g[tab]
>nothing
>double tab
>type ame{tab}
>type W{tab}
>type h{tab}
>type a{tab}
>{double tab}
>nothing
>realize your mistake
>backspace
>backspace
>backspace
>two more accidental backspaces
....
>>
>>57118916
Is this a parody? Or for real?
Did I not disprove this CLI MEME back in >>57115108
>>
>>57119166
Its really than real
>>
>>57110489
For me, a large number of files is a folder with maybe a couple hundred thousand files, sometimes a few million.
Sometimes, every folder in a directory has that many.
Coppies like those grind GUi's to shit, nearly all the time they simply cannot handle it.
When yoor playing with that many files, proper naming simply isn't optional.
But yes, for stuff like coppying off my camera and searching by date, I do just use a gui.
>>
>>57112392
See
>>57119636
Shit like rsync where you wanna tell it exactly what to do.
Plus massive directories also.
For me it's mainly massive directories.
>>
>>57110209
You don't belong here. Maybe you can find a more sutible board, perhaps /b/?
Thread posts: 105
Thread images: 11


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

If you need a post removed click on it's [Report] button and follow the instruction.
If you like this website please support us by donating with Bitcoin at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties. Posts and uploaded images are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that website. If you need information about a Poster - contact 4chan. This project is not affiliated in any way with 4chan.