TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rip2 – A safer, rust-based rm

32 pointsby roflmaostc7 months ago

17 comments

candiddevmike7 months ago
It&#x27;s rm with a trash can that by default is in a terribly insecure location (&#x2F;tmp is typically world read&#x2F;writable).<p>EDIT: just tested it, it creates &#x2F;tmp&#x2F;graveyard-$USER with 0755.
评论 #41903336 未加载
评论 #41903228 未加载
评论 #41903226 未加载
评论 #41903260 未加载
评论 #41903375 未加载
评论 #41903235 未加载
评论 #41903481 未加载
评论 #41903370 未加载
评论 #41903224 未加载
评论 #41903287 未加载
评论 #41903234 未加载
0points7 months ago
Warning, this software<p>&gt; does not implement the xdg-trash spec or attempt to achieve the same goals<p>Second warning, deleted files become world readable by design<p>&gt; Deleted files get sent to the graveyard (typically &#x2F;tmp&#x2F;graveyard-$USER
评论 #41903317 未加载
marsavar7 months ago
It&#x27;s always laudable when OSS projects get some love, but... I&#x27;m slightly put off by programs that try to be witty or funny (e.g. flags like --decompose and --seance)
评论 #41903361 未加载
amelius7 months ago
I don&#x27;t think this is solving the problem at the right abstraction level.<p>For example, you can also &quot;delete&quot; files by accidentally redirecting to them using the &quot;&gt;&quot; operator in the shell.<p>Maybe some kind of snapshotting filesystem (+ tools) is a better way to deal with this.
dathinab7 months ago
I wonder what amount of this being pushed so much is<p>- the allure of improving on well established UNIX commands (always an interesting topic)<p>- and the &quot;it&#x27;s rust factor&quot;
评论 #41903357 未加载
pmarreck7 months ago
I&#x27;m building a general-purpose undo that will log and let you undo things like chmods, chown&#x2F;chgrps, mv&#x27;s and rm&#x27;s. it will work with the recursive parameters of those utilities and shunt that out to `find` with `-exec` so it can track the undo of every individual file. it will use the xdg-trash spec for rm&#x27;ing files. I haven&#x27;t pushed it up to github yet but I have test cases working locally. in particular it will handle idempotent updates properly so if you for example chown a file with the same user and group, it will be recorded as a no-op so that a later (untracked) change won&#x27;t get overwritten when you undo a tracked change that would otherwise interfere with it.<p>it&#x27;s just plain old bash, so nothing fancy like Rust, but it should work
formerly_proven7 months ago
A small psa if you&#x27;re on Windows and like this tool want to focus on &quot;ergonomics&quot; and &quot;performance&quot; of deleting files, disabling real-time protection in the security center makes deleting large directory trees about 50% faster and reduces CPU usage by about 80% for me. It&#x27;s wholly non-obvious to me why this is the case, considering that DeleteFile doesn&#x27;t even use a file handle. Perhaps it acquires one internally, and that still triggers demand scanning of the file to be deleted?
评论 #41903431 未加载
johnisgood7 months ago
OK, in what way is it safer than the GNU or BSD alternative? If it has to do with logic, it could be implemented just fine.
评论 #41903471 未加载
评论 #41903292 未加载
guytv7 months ago
I really liked the idea.<p>Played around with rip2 on my MacOS.<p>Unfortunately after playing with it for two minutes, the &quot;undo&quot; and &quot;scance&quot; functionality seemed to break:<p>I have opened a bug <a href="https:&#x2F;&#x2F;github.com&#x2F;MilesCranmer&#x2F;rip2&#x2F;issues&#x2F;54">https:&#x2F;&#x2F;github.com&#x2F;MilesCranmer&#x2F;rip2&#x2F;issues&#x2F;54</a>].<p>am I doing something wrong?
exitb7 months ago
Except it&#x27;s mv
评论 #41903473 未加载
sk110017 months ago
It&#x27;s cool that you can build this but in practical terms it&#x27;s solving a problem that nobody has.
评论 #41903785 未加载
评论 #41903871 未加载
评论 #41903493 未加载
xyst7 months ago
I don’t know if I would use it but thanks for reviving a dead project and maintaining it
travisgriggs7 months ago
When someone does a zig implementation of rm, what will its headline announcement be?
showsomerespect7 months ago
I&#x27;m struggling to see the advantage of this over, for example, `trash-cli`
caseyy7 months ago
So, what will happen to all bash scripts once rm is aliased as suggested?
评论 #41903509 未加载
gochad7 months ago
Cool project, hopefully you got a good grade!
torginus7 months ago
I yearn for the day when Rust devs will be able to withhold mentioning that the software they made is, in fact, written in Rust.
评论 #41903603 未加载
评论 #41903743 未加载