Quantcast
[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

If you can see this message, the SSL certificate expiration has been fixed.
Become a Patron!

/g/ - Technology


View post   

[ Toggle deleted replies ]
File: 56 KB, 453x604, 1316771294957.jpg [View same] [iqdb] [saucenao] [google] [report]
71664266 No.71664266 [Reply] [Original] [archived.moe] [rbt]

>$ rm ./folder
>rm: cannot remove './folder': Is a directory
>$ rm ./folder -d
>rm: cannot remove './folder': Directory not empty
>rm: remove write-protected regular file './folder/bullshit.cocks'?
>y
>rm: remove write-protected regular file './folder/fuck you.cocks'?
>y
>fast forward 9000 cocks and yeses later
>$ |

>> No.71664284
File: 18 KB, 245x324, ft5d5nb3cg_00005.jpg [View same] [iqdb] [saucenao] [google] [report]
71664284

whoops forgot
>$ rm ./folder -d -r
but you get the idea. Who created this monster? Why it is faster to remove something with a GUI than the fucking command line.

>> No.71664289

rm -rf <files or directories>
Wow. That was hard.

>> No.71664328

>>71664266
rm -R folder/

>> No.71664368

Look on the bright side you can do less accidental damage like that.

>> No.71664377

>>71664266
rmdir
rm -rf

>> No.71664389

>>71664284
Its not. It just took you longer to figure out because you didn't know how. If you wanted to do it again it would be much faster because you know tge command.

>> No.71664397

>>71664284
>Why it is faster to remove something with a GUI than the fucking command line.
Only if you know the GUI / its hotkeys, but apparently do not know the basic use of the fucking command line.

It is not faster otherwise. It's just rm -r.

>> No.71664405

>>71664368
Command line is inherently safer than GUI. These precautions don't make practical sense 30 years later.

>> No.71664416

>>71664397 (cont'd)
Also, no, you don't need ./ or -d .

Just rm -r.

>> No.71664449

>>71664405
[[email protected] ~] $ rm -rf . /unwanted_dir/
Oops. You just deleted everything in your home directory.

>> No.71664516

>>71664449
There's no recycle bin in bash??

>> No.71664537

>>71664449
rm will refuse to remove . and ..
rm -rf /home/anon/ unwanted_dir/
would be more problematic.

>> No.71664551
File: 62 KB, 461x660, 02.png [View same] [iqdb] [saucenao] [google] [report]
71664551

>>71664537
Pic related.

>> No.71664731

>>71664516
You can have a CLI recycle bin, but of course it's not there by default.

If you only ever used Explorer you may not know this, but most software doesn't ask again about every change you directed it to do.

>> No.71665149
File: 62 KB, 516x507, 5b6f3a283e706377f2c31053b9ede6c4aa702e050b8caaf8c5fb7934d4c2ec9a.jpg [View same] [iqdb] [saucenao] [google] [report]
71665149

>>71664266
Holy fucking shit, I can't believe how retarded this is.
Also, these.
>>71664328
>>71664416

>> No.71665517

>>71664284
rm -r directory
rmdir directory
rm file

>> No.71665854

>>71664289
>rm -rf
>pressing 4 extra keys to do what rm should just do by itself

>> No.71666366

>>71665854
it's sane, so you don't fuck up shit by accident and you don't need it that often
you can alias it anyways if you insist

>> No.71666478

just type rm *.* -r, everything will be fine

>> No.71666514

>>71664266
I wish I could know the story behind that picture.

>> No.71666537

>>71666366
The -f part, yeah, that's understandable, but when I type a remove command, it should automatically be able to remove files and multi-layers of directories.

>> No.71666538

>>71665854
alias rm="rm -rf"
wow that was hard

>> No.71666559

>>71666538
>things I shouldn't have to do to make a simple remove command work as it should

>> No.71666572

>>71666538
alias rm="/bin/rm -rf"
dont be silly

>> No.71666582

>>71665854
This. Btw guns shouldn't have a safety either.

>> No.71666629

>>71666559
>I am an authority on how basic tools should behave

>> No.71666630

>>71666537
the -f part is mostly unnecessary because normaly you don't have write protected stuff. -r is the safety trigger, so you don't accidentry remove directories (where might be something important in it, you forgot about)

>> No.71666691

>>71664289
Requiring the -rf option is pointless. After a little bit of experience everyone essentially automatically types "rm -rf" with muscle memory every time they delete something and it's 4 characters extra for no reason and any notion of safety is gone anyway.

>> No.71666708

>>71666538
Now do this 1000 more times for all the other things that are stupid by default and then repeat it every time you do a fresh install.

>> No.71666710

>>71666630
If a user wants to delete his Documents folder, it should be obvious that he also wants to delete the things inside the documents folder as well. Making the user type extra stuff like -r or -rf or whatever is just making the user jump through hoops to do what he intended to do.

>> No.71666768

>>71666691
>After a little bit of experience everyone essentially automatically types "rm -rf"
That's where you are wrong though. If you do this then you should start paying more attention to what you type.

>> No.71666813

>>71664284
>Why it is faster to remove something with a GUI
Wrong, rm ./folder -d -r and rm -rf ./folder is not the same as removing something with the GUI,
mv ./folder ~/.local/share/Trash/files/ is more like it, the GUI equivalent of rm -rf ./folder is SHIFT+DEL on the GUI.

>> No.71666817

>>71666708
>Now do this 1000 more times for all the other things that are stupid by default
Name ten.
>and then repeat it every time you do a fresh install.
Why wouldn't you just copy your .bashrc?

>>71666710
You always assume that it only prevents users from deleting directories they explicitly list. If you accidentally put a space somewhere in the path to a single file, it would delete the path before the space.

>> No.71666908

>>71666817
Users can just CD to the location containing the folder/s and files they wish to delete if they're afraid of screwing up the path.

>> No.71667017

>>71666908
So typing -rf is too much work, but changing into a directory just to delete something safely isn't?
Also you usually don't fuck up, if you're afraid to do so. You fuck up, when you don't expect it.

>> No.71667092

>>71667017
the CD is optional, the -rf generally isn't.

>> No.71667202

>>71667092
Another reason to have the user specify -rf. Safety should be the default and not optional.
Again, if you want it as default solution then use a Bash alias and be glad that it doesn't force you to remove the directory's content separately like rmdir.

>> No.71667284

>>71667202
The safety comes from the effort it takes to type the commands. I wouldn't type RM if I didn't want to delete something.

>> No.71667330

>>71667284
Yes and you can delete normal files just fine.

>> No.71667792

>>71664266
And this is why I use Windows. Click on folder. Press delete. Wow, so difficult.

Linux is fucked. I tried to do something on it the other day, which led me to require use of the command line. Which led to me googling how to do something which led to me googling something else which didn't work so I had to google something else, which led to an error message... to this day I'm convinced I was going down the rabbit hole of an endless loop of error messages and googling the errors.

Windows > Linux

>> No.71667851

(You)

>> No.71667900

>>71667792
>Click on folder. Press delete. Wow, so difficult.
You make it sounds like you're unable to do this on Linux. Every file manager worth a damn can do it.
rm is useful in scripts and because of glob matching.

>> No.71667966
File: 7 KB, 212x200, 1561188741390.jpg [View same] [iqdb] [saucenao] [google] [report]
71667966

>>71667792
Windows is an NT kernel. You used explorer.exe.

>Linux
Linux is also a kernel. Try using Nautilus, Dolphin, Thunar, PCManfm, ranger, mc, nnn, fff or whatever

>> No.71667979

>>71667966
>>71667900
Wow, you sure showed that retard by swallowing all of his bait.

>> No.71668046
File: 52 KB, 289x275, 1559338217879.jpg [View same] [iqdb] [saucenao] [google] [report]
71668046

>>71667979
>bait
more like /g/ in $(current year)

>> No.71668099

>>71668046
>$(current year)
/g/ has always been shitty, yet it is no excuse to keep it that way, at least learn to sage if you're not going to lurk like a proper newfag.

>> No.71668220

>>71666582
>no safty on fire arms
Enjoy shooting your dick

>> No.71668750

>bullshit.cocks
made me unironically laugh

>> No.71668898
File: 21 KB, 884x551, CopyQ.zkXvNt.png [View same] [iqdb] [saucenao] [google] [report]
71668898

>> No.71668975

>>71668898
That theme looks nice. Which one is it?

>> No.71669029

>>71664266

>> No.71669057

>>71665854
Good.
Deleting directories SHOULD be hard, in fact I'm upset that it isn't harder.

>> No.71669334
File: 34 KB, 600x315, 1561933139276.jpg [View same] [iqdb] [saucenao] [google] [report]
71669334

>>71668975
Linux colors.

>> No.71669568

>>71664284
>>71664266
You don't have to confirm shit in the gui because the gui tells you what you're about to delete. You know what you've selected, you know if it's a directory or a file. And it's not really removed, just moved to bin. Commandline has no guarantee you know you're about to delete a directory so it has to ask you to confirm or you need to specify that you know what you're doing - 'f'

>>71665854
>t. never used powershell
Oh no, 5 chars and a space

>> No.71669660

>>71667284
>I wouldn't type RM if I didn't want to delete something.
Then just alias 'RM' to delete a random file or a dir in your system. I mean, if you: want to delete something, don't want to make sure you delete what you want, don't want to make sure everything else is not deleted; then doing that seems to be the best and quickest option.

>> No.71669682

>>71664266
>what is the internet?
sudo rm -r ./folder
Holy shit, you don't even have to read the man page.

>> No.71669700

>>71667792
This, people who don't have time to use 'rm -rf' use
>Remove-Item -Recurse -Force
Like Bill Microsoft Gates intended

>> No.71670471

>>71667284
There's no safety provided by the three characters. It's such a negligible increase in typing that it really doesn't matter.
A mistake is generally far from the -rf, where you're actually intending to delete one folder tree, and then hit up an entirely different one on accident.

More sensible systems provide recycle bin and un-delete functionality, so such errors can be corrected. A full delete requires two actions, a move to the bin (which at its simplest could just be a bare folder, but a more sensible implementation would manage where stuff came from to make undeletion easy and not clobber existing files in the bin if they have the same name), and then a true delete, after you've been able to inspect whether the files you've put in the bin are actually the ones you were supposed to delete.
Mistakes are still possible, but now there's an actual safeguard.

On that note, I'm still particularly annoyed that in this era of large disks, there's still no nicely integrated automatic file versioning system, for if something stupid happens to a file, whether it be negligence or simply wanting to revert against an older state. Operating systems from the fucking 70s have had this.
I know a few people who store shit on Dropbox or MEGA or whatever just because these services do provide file versioning. Some people do shit like check a bunch of assorted files into a git repo (either local or remote) every once in a while.
CopyFS exists to bolt the feature onto your existing file systems, but it hasn't been maintained since like 2006 according to the file modification dates in the tarball.

>> No.71670505

>>71664266
rm -rf you dink. Don't you ever see memes about rm -rf? It's like the best known Linux command.

>>
Name (leave empty)
Comment (leave empty)
Name
E-mail
Subject
Comment
Password [?]Password used for file deletion.
Captcha
Action