Questions tagged [algorithms]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

Weak MAC Algorithm(s) Supported (SSH)

I have this lines in my /etc/ssh/sshd_config file: MACs hmac-sha2-256,hmac-sha2-512,[email protected],[email protected] MACs [email protected],[email protected],-hmac-...
Shrm's user avatar
  • 178
-2 votes
1 answer

round-robin in bash script

i have this task to do, but im actually stuck with this round-robin algorithm, here's the details input file there are 3 process A, B and C second column is the arrival time third column is nut value ...
peter louis's user avatar
0 votes
0 answers

How to measure CPU, MEM usage and more for a short lived process

I've got a program with some compiled sorting algorithms, and I'm trying to use top to monitor its cpu and ram usage. Normally this would be fine, given that the process runs for a few minutes, ...
Jordan Renaud's user avatar
2 votes
1 answer

How to reposition the elements of a json array conditionally using jq?

I want to re-position elements of an array (change index of array elements) based on a condition. I don't know how to translate this to jq which is more of a functional language. Basically I want to ...
Zeta.Investigator's user avatar
0 votes
0 answers

What kind of Hashing algorithm is my Linux using? [duplicate]

In Kali Linux, I found an unknown hash algorithm used to encrypt the Kali Linux password. root:$y$j9T$J3nInhusIQkrmvCnX8tlo.$KduXmrDY7wv3o2P/k9t35adUH5XWUBYngo1Wxypy2X.:18749:0:99999:7::: My ...
Md. Zidan Khan's user avatar
6 votes
0 answers

GRUB alternative for LUKS2 with Argon2ID support

It seems that the even the most recent version of GRUB2 doesn't support LUKS2 with the PBKDF Argon2ID (source). The Raspberry Pi bootloader for instance fully supports this new hashing function. Is ...
Polizi8's user avatar
  • 275
1 vote
1 answer

Where can i learn algorithms from zero? [closed]

I've been studying programming for like 3 years or so but my teachers never taught me algorithms. Are there any online courses for beginners? with tasks.
Nib Bba's user avatar
  • 13
-2 votes
1 answer

Why is it not possible to use SJF (Shortest Job first) in Linux? [closed]

why it is not possible to use SJF as the scheduling algorithm for Linux?
user422990's user avatar
1 vote
1 answer

What data structure is the stack using in Linux?

I have looked in several places such as here but none explain in detail the structs used for implementing the stack itself (the place where "tasks" (processes/threads) store their nested call ...
Lance's user avatar
  • 437
1 vote
1 answer

Restrict Access to SSH server based on incoming key type

I am running ubuntu 18.04.3 server HWE edition in my local lab and while reading the manuals I came across the issue that I am unable to determine how to exclude users from connecting to my server via ...
Seemax's user avatar
  • 19
0 votes
1 answer

Arguments for, and the applicability of, using multiple forms of compression on one or more files?

I was wondering whether there are any scenarios which require file(s) to be compressed multiple times with the same or a different algorithm. As far as i can tell the file size can be reduced further ...
TommyFlowers's user avatar
1 vote
2 answers

Transforming if statement in case

I'm currently testing changes in my scripts for performance purposes. Specifically, I want to change if to case statements. However, being new to shell programming I'm getting stuck on this type of ...
Matieu's user avatar
  • 23
-1 votes
2 answers

Trying to complete Project Euler #5, passes all syntax checks but doesn't work

trying to complete Project Euler #5. The code I have should logically work, and it passes ShellCheck, but gives no output for some reason. The code is below. Thanks and sorry if this should be in a ...
Egrodo's user avatar
  • 207
3 votes
1 answer

OpenSSH accesslog : Logging ciphers, MAC and user agent

How to log the Protocol, KexAlgorithm, Cipher and MAC algorithm negociated by the client and the client's user agent string? What I'm looking for is the OpenSSH equivalent to Apache HTTPD's CustomLog+...
Cerber's user avatar
  • 235
0 votes
3 answers

Can I obtain microsecond granularity when I calculate the number of nanoseconds from Windows Epoch to today?

Using Ubuntu Linux 16.04 and g++, I was wondering if could obtain microsecond or millisecond granularity when I calculate the number of nanoseconds between Unix Epoch or Windows Epoch and an arbitrary ...
Frank's user avatar
  • 671
3 votes
2 answers

How can I partition a set of words given pairs that must end up together?

I have a space or comma separated table with two columns, each row representing equivalence of the two words. A B B C B D C E F G What I want is a table with each row listing all mutually ...
Vinay's user avatar
  • 41
6 votes
4 answers

Can I use scrypt to hash for LUKS?

Can scrypt be used as the hashing algorithm for LUKS? Can I tune its parameters? How can I do this?
user avatar
21 votes
7 answers

Is there an algorithm to decide if a symlink loops?

Unix systems usually just error out if they are confronted with a path that contains a symlink loop or just too many symlinks, because they have a limit to the number of symlinks they will traverse in ...
JanKanis's user avatar
  • 1,049
5 votes
2 answers

What does net.ipv4.tcp_app_win do?

I can't figure out why the tcp_adv_win_scale and tcp_app_win variables coexist in Linux.  The information from tcp(7) says: For tcp_adv_win_scale: tcp_adv_win_scale (integer; default: 2; since Linux ...
javag87's user avatar
  • 53
5 votes
4 answers

Grepping over a huge file performance

I have FILE_A which has over 300K lines and FILE_B which has over 30M lines. I created a bash script that greps each line in FILE_A over in FILE_B and writes the result of the grep to a new file. ...
marcio_rogerio's user avatar
30 votes
1 answer

Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation?

Until recently I thought the load average (as shown for example in top) was a moving average on the n last values of the number of process in state "runnable" or "running". And n would have been ...
user368507's user avatar
  • 2,163
9 votes
3 answers

Why does it makes sense to cache swap?

It sounds quite counter-productive to me to cache pages that are swapped out. If you swap pages in, what is the advantage to first cache them in memory, only to have to than move them to the right ...
txwikinger's user avatar
  • 2,216