Suddenly I’ve discovered that two various SHA-256 calculators produce different values. Here is the real example — having had downloaded a ‛Neovim’ image, at first I didn’t get what was going on:
> cat nvim.appimage | sha256sum
ef9056e05ef6a4c1d0cdb8b21f79261703122c0fd31f23f782158d326fdadbf5 -
> cat nvim.appimage | hashalot -x sha256
ced1af6d51438341a0335cc00e1c2867fb718a537c1173cf210070a6b1cdf40a
The correct result is what ‛sha256sum’ gives — it matches the value on the official page. Did I do anything wrong? And how to avoid such unexpected effects in the future?
The operating system is Linux Mint 19 Cinnamon.
Thanks to user17732522 (https://stackoverflow.com/users/17732522/user17732522)
I forgot the name of the proper program, and after typing the wrong name, the shell suggested installing hashalot to calculate the sum. I did and read the man page but just only the first lines. If I had looked deeper, I wouldn’t be wondering and didn’t ask the question. The answer has turned out so simple. Thanks a lot!
Related
I would like to add the long help navigation functionality to my cli app. For example:
git config --list
... or ...
man ls
I'm looking for a ready-made node module, but I'm getting to the point of implementing it myself. Even then, I'd like to know what that functionality is called.
Thanks!
Update
The closest I came to describing this is captured by the more command. Since folks can just pipe my output to more, I've decided not to spend a lot of time reinventing the wheel.
The closest I came to describing this is captured by the more command. Since folks can just pipe my output to more, I've decided not to spend a lot of time reinventing the wheel.
my-amazing-app | more
FYI. In case someone else is looking for more google fodder.
I am using a program by using the linux kernel (in this case a predictor for protein localization). The output/results are printed in the linux kernel, one after each other. However, if I want to copy it to a simple textfile, the "length" of the kernel is not long enough for all the results.
instead of using smaller seperate files, I would like to print the output of the kernel to a file. I tried to google this, but it doesn't really help me futher.
1. dmesg seems to be for system-output stuff?
2. the /var/log/syslog.txt doesn't show the stuff I need, but other technical kernel stuff.
3. i saw something with printf(), but didn't quite understand the mechanics and if it was useable for my problem.
could someone explain how to do this or where to look for the right info?
I think i found out how to do it, by using > fileToBeNamed.txt at the end of the command, Sorry :(
I have sailed the 1e100 and did the mandatory search your question. I'll keep it short cos for most of you here time IS money so.
Leaving out the circumstances, i am left with 18 gb of data from testdisk recovery after total weirdness on all my pcs at once.
One of those might be a mega recovery key which unfortunately i stashed in two offline and one online place and are all gone (total weirdness, nm that)
I can probably script this with some thinking but my head is in explode-mode so i was wondering if any superguru here knows the oneliner to do that before i start scripting multiple lines in loops.
Anything that gets through umpteen recursive dirs listing all files with exactly x characters will do fine, that should narrow it down a lot.
If not not, cant blame me for asking i hepe. Thanks in advance for your time. (im using Linux mint 18.1 mainly or openwrt on that little vocore but i can switch to anything installable for this time i suppose)
I see ... (how to mark as solved, mark the answer that solved it but if there is none write your own) ok
the answer is simple, thanks to mister Benjamin W.
go the the directory that contains all the folders you need to check (however you do, in linuxming rightclick and "open terminal" for instance)
then theres one simple command : (for a file 22 characters in size in this case 22,no newline which i dont think matters since a newline is a character but see thats why im not good at here i go again)
the command was "find -size 22c"
gotta love linux
(ah well, assuming you got all the directories and files under one folder and set the permissions b/c testdisk writes to locked folders so you would have to change those and thats where i start elaborating but i found i found assuming is often incomplete so im sorry for that, you also have to ... turn the computer on and press play on tape but let's assume that for once)
nothing more , nothing less, thanks a lot and i think this site truly belongs top 10 or five in the whole ww
have a nice day
A quick explanation of the problem I'm trying to solve: I have a .bashrc and PS1 I like to use on all systems I log into. I have written a little script to automatically set this up, and hosted it on gist.github, so I can use a one-liner to set everything up. I use terminator to keep many shells open at once. Lately, I've been keeping open ssh in many of the shells, and it's becoming hard to keep track of which shells are my local box and which shells are other servers.
I want to differentiate between shells. However, I don't want to use the hostname or things like that, because my PS1 is already enormously long.
My proposed solution is to hash the output of ifconfig, use it to retrieve a word from somewhere, then stick the first four letters of it in the PS1. As such, the word provider should have the following constraints: the same number should return the same word every time, and the words provided should vary relatively widely.
Anyone have any ideas, or a better solution? Thanks!
Edit: Here's a screenshot of my current PS1 for reference:
Edit 2: Here's a screenshot of my PS1 as of Feb 2018, after splitting the contents onto multiple lines. The "START" lines ensure I can always remember when I ran a command, and how long it took.
Yeah... that's an enormously long $PS1. Anyway.
Hashing the same value with the same algorithm and no salt will result in the same hash result each time.
$ echo -n "123" | md5sum | cut -c 1-8
202cb962
First, I apologize for any sillinesses that might occur, as I'm not quite sure as how to properly put this question.
I recently got curious about how some applications (like Midnight Commander) control the text-mode output, forming so-called "Text-based user interface", idk. Is that some evil magic with standard output operations or something else that I'm unaware of? I did some poking around google, but didn't find anything of particular interest, and I hope someone here can point me on the right way.
Thanks in advance,
~Insomnia Array
What you're looking for is NCurses - a library which uses special terminal characters to set color, position, etc.
http://www.gnu.org/s/ncurses/
In addition to ncurses, take a look at S-lang.
http://www.s-lang.org/