mina86

joined 3 months ago
[–] mina86@lemmy.wtf 45 points 1 week ago* (last edited 1 week ago) (1 children)

VeraCrypt Volume Format Specification:

Each VeraCrypt volume contains an embedded backup header, located at the end of the volume (see above). The header backup is not a copy of the volume header because it is encrypted with a different header key derived using a different salt (see the section Header Key Derivation, Salt, and Iteration Count).

It may be possible to recover the encryption key. You might try asking on VeraCrypt forums/mailing lists or contacting a commercial data recovery service which understands VeraCrypt. Though I’m not familiar with VeraCrypt so I may be misunderstanding the cited documentation.

[–] mina86@lemmy.wtf 8 points 1 week ago

For doing stuff in a directory, I use a replacement for cd command.

For aliases:

alias +='git add'
alias +p='git add -p'
alias +u='git add -u'
alias -- -='cd -'
alias @='for i in'
alias c='cargo'
alias date='LANG=C date'
alias diff='cdiff'
alias gg='git grep -n'
alias grep='grep --color=auto'
alias ll='ls -o'
alias ls='ls -vFT0 --si --color=auto --time-style=long-iso'
alias rmd='rmdir'

I also have various small scripts and functions:

  • a for package management (think apt but has simplified arguments which makes it faster to use in usual cases),
  • e for opening file in Emacs,
  • g for git,
  • s for sudo.

And here’s ,:

$ cat ~/.local/bin/,
#!/bin/sh

if [ $# -eq 0 ]; then
	paste -sd,
else
	printf '%s\n' "$@" | paste -sd,
fi
[–] mina86@lemmy.wtf 1 points 3 weeks ago (1 children)

Yeah, it has been slowly growing on me 😜. But I would like to explore all other options before I fully commit.

You’ve already discovered the best editor. There’s no need to explore more. ;)

[–] mina86@lemmy.wtf 3 points 3 weeks ago (1 children)

What you have in title of the post, body of the post and in this screenshot all disagree with each other.

[–] mina86@lemmy.wtf 3 points 3 weeks ago (1 children)

Use backtics to quote code fragments. Tripple backtics to block quote. You should be able to edit your post.

[–] mina86@lemmy.wtf 4 points 4 weeks ago (1 children)

Unless you go in with a byte editor, you can’t change Mercurial’s commit history. I didn’t say “fabricate”, I said “change”.

In git you also cannot change history of a commit. You can only create a new commit with a new history. You’re arguing about semantics which don’t change the end result.

The point is, with Mercurial it would be hard and the result would be utterly incompatible with any other clone of the repo: there would be no way to propagate your changes to other clones. With git, this is a standard workflow.

As the example under discussion demonstrates, it’s also impossible to propagate the changes to git clones. Since history changed, merging the pull requests shows all the differences. That’s how Linus noticed the issue.

[–] mina86@lemmy.wtf 3 points 4 weeks ago

Well, that’s kind of his personality though.

Yes. Linus is known to overreact and use colourful language.

[–] mina86@lemmy.wtf -1 points 4 weeks ago

If it was compromised account trying to sneak code into the kernel, the attacker wouldn’t rewrite history since that would be obviously flagged when Linus tries to merge the pull request; as demonstrated by Linus in fact noticing the rewritten history. There was virtually no chance that this was an attack.

[–] mina86@lemmy.wtf 43 points 4 weeks ago* (last edited 4 weeks ago) (11 children)

Unless commits are signed, you can always rewrite history. No matter the tool. Extreme example demonstrating that this is possible is the fact that I can change my machine’s time, change my user name and reply the tool’s commands to construct whatever history I want.

[–] mina86@lemmy.wtf 8 points 4 weeks ago (5 children)

It was in fact a microscopic deal. Linus overreacted. Lemmy and Reddit milked the drama.

[–] mina86@lemmy.wtf 1 points 1 month ago
find -type f -exec chmod 644 -- {} +
find -type d -exec chmod 755 -- {} +

will only affect regular files and directories. There are other type of files (specifically block and character devices, named pipes and sockets) which those two commands would leave unaffected. In practice, I suspect you don’t have any of those to worry about so you can use -find f.

[–] mina86@lemmy.wtf 3 points 1 month ago

So does it wait until it has found all the matches to run the command as a giant batch instead of running it as it finds matches?

Indeed. If possible, it is typically what you want (as opposed to find ... -exec ... {} \; which runs command for each found file) since it will run faster. You want find ... -exec ... {} \; if the command you’re executing can run on single file only or you’re dealing with legacy system without -exec ... {} + support.

34
submitted 3 months ago* (last edited 3 months ago) by mina86@lemmy.wtf to c/linux@lemmy.ml
 

Response to a recent claim that Ctrl+D in the terminal is like pressing Enter. It kind of is but it’s also misleading to say so without further explanation.

view more: next ›