orsetto

joined 2 years ago
 

The following is something I wrote earlier. I don't know the validity of it, and I'm not sure I correctly expressed the concepts of "power" and "rights" after translating them from italian.

--

Lately I had in mind the concept of right. Specifically, the idea Stirner had about it.

When I read The Ego and It's Own, that passage stuck with me.

[omitted unrelated stuff, because I started thinking about other things before writing what follows]

I'm thinking how the whole action of Giorgio Rosa [1] was anarchist in it's essence. He created that island just because he could do it: he had the power to do it.

I'm thinking about how many times I did something just because I could, and because I felt like it. I'm sure that more than once me and that-one-friend answered the question "why?" with "because we can". And I'm thinking how "because I can" is one of the fundamental hackers' "ideology" - mostly.

I'm thinking about how "because I can" is one of the most genuine motive that people have to justify their actions.

And, in fact, what I'm saying is somewhat tied to the concept of right. Right now, the first to decide if I have the power to do something is exactly my right to do it. And my rights, at the same time, are decided by people who have power over me! And so I say that the concept of "right" has no meaning, because I won't allow those people to hold power over me.

[1] (but not in its execution) https://en.wikipedia.org/wiki/Republic_of_Rose_Island

[–] orsetto@lemmy.dbzer0.com 2 points 1 month ago

Oh yeah i figured there were some tools able to do that, i meant to say that you can't substitute one with the other in place without doing some sort of conversion.

[–] orsetto@lemmy.dbzer0.com 2 points 1 month ago

sorry for the late reply. I honestly do not remember what the procedure is. The best thing you can do is look on the internet for a easy to follow guide, or wait for someone else's response

[–] orsetto@lemmy.dbzer0.com 10 points 1 month ago (4 children)

Unfortunately changing from MBR to GPT also deletes existing partitions and partition table, because the two are not compatible.

Luckily, testdisk should be able to recover the old partition table without much fuss, if you didn't write other data to the disk.

I don't have a manual handy but the man page from what i remember is pretty clear, and there's also an online documentation.

[–] orsetto@lemmy.dbzer0.com 12 points 2 months ago

And all that just because someone decided that an array bigger that 16 bytes would have been too expensive (/s probably)

[–] orsetto@lemmy.dbzer0.com 35 points 2 months ago (2 children)

I'm almost sure the backstory to how you gained this knowledge is "i spent hours debugging something, and that 15 chars limit was the problem"

[–] orsetto@lemmy.dbzer0.com 2 points 2 months ago (4 children)

I might be a robot, I don't know why but i can't solve the captcha lol

I'd love to give this a try tho so maybe I'll come back later

Just a random idea, but would you consider using anubis instead? (That new thingy that has been popping up lately, for example on the archwiki). I haven't checked it out but I bet it's also better on a privacy standpoint in respect to google's captcha

[–] orsetto@lemmy.dbzer0.com 2 points 3 months ago (1 children)

There’s no shame in combining multiple tools, that’s what pipelines are all about

Not at all, but some times it's just funny

You can select specific lines, with regex or by using a line number; or you can select multiple lines by using a comma to specify a range.

Yep, learning this made sed even more useful to me.

I also gave awk a try and now i know what i've missed all these years

(Also, sorry for the 12 days old reply :))

[–] orsetto@lemmy.dbzer0.com 2 points 3 months ago

12 days late, but thanks for the bit of history, I always enjoy this stuff :)

[–] orsetto@lemmy.dbzer0.com 13 points 3 months ago (8 children)

I understand what argument could be made against musl, which is licensed under MIT, but what's wrong with GPLv2?

I remember Torvald saying something about not wanting to change the kernel's license to GPLv3, but I've never understood the differences

[–] orsetto@lemmy.dbzer0.com 3 points 3 months ago (2 children)

Are you opposed to using awk?

Not at all, I'm just not familiar with it so I find it confusing.

Although, looking at your command, i think I understand what it means

[–] orsetto@lemmy.dbzer0.com 2 points 3 months ago (2 children)

I see. I guess what confused me was that i didn't understand what addresses were.

Thank you for your explanations :)

22
Help with sed commands (lemmy.dbzer0.com)
submitted 3 months ago* (last edited 3 months ago) by orsetto@lemmy.dbzer0.com to c/linux@lemmy.ml
 

Hi all! I have always only used sed with s///, becouse I've never been able to figure out how to properly make use of its full capabilities. Right now, I'm trying to filter the output of df -h --output=avail,source to only get the available space from /dev/dm-2 (let's ignore that I just realized df accepts a device as parameter, which clearly solves my problem).

This is the command I'm using, which works:

df -h --output=avail,source \
    | grep /dev/dm-2 \
    | sed -E 's/^[[:blank:]]*([0-9]+(G|M|K)).*$/\1/

However, it makes use of grep, and I'd like to get rid of it. So I've tried with a combiantion of t, T, //d and some other stuff, but onestly the output I get makes no sense to me, and I can't figure out what I should do instead.

In short, my question is: given the following output

$ df -h --output=avail,source 
Avail Filesystem
  87G /dev/dm-2
 1.6G tmpfs
  61K efivarfs
  10M dev
...

How do I only get 87G using only sed as a filter?

EDIT:

Nevermind, I've figured it out...

$ df -h --output=avail,source \
    | sed -E 's/^[[:blank:]]*([0-9]+(G|M|K))[[:blank:]]+(\/dev\/dm-2).*$/\1/; t; /.*/d'
85G
view more: next ›