Sunday, June 26, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Rolling up Multiple Rows into a Single Row

Posted: 25 Jun 2022 11:35 PM PDT

How can I rollup multiple rows from a csv file into 1 row ? I have tried working out the query in SQL and it works but I am not sure how can I achieve the same in Linux.

This is how my current file looks :

swainb02,Ben Swain,1015

swainb02,Ben Swain,1016

swainb02,Ben Swain,1018

swainb02,Ben Swain,1020

shaiks21,Sarah Shaikh,0073

shaiks21,Sarah Shaikh,0080

shaiks21,Sarah Shaikh,0082

There are multiple users with access to multiple area codes. What I am looking for is a simpler version of this file for better readability.

Desired Output :

swainb02,Ben Swain,1015,1016,1018,1020

shaiks21,Sarah Shaikh,0073,0080,0082

Any idea how can this be worked out ? Thanks

What things are not saved in a btrfs snapshot?

Posted: 25 Jun 2022 11:01 PM PDT

I'm using BTRFS for my root partition and manage its snapshots with Snapper. I decided to create subvolumes for /var/tmp, /var/cache and /var/log as these are constantly changing its data which is not a good idea for scheduled snapshotting. In this way, they are not saved.

However, I noticed that files inside /tmp where included in the snapshots too, which is not what I want. I was mounting a tmpfs filesystem there but it was saved anyways. I ended up creating a subvolume for it.

I noticed that /sys, /run and /proc are not saved (which is a good thing). What do they do to achieve that? can I do the same for /tmp? what things are not saved in a btrfs snapshot? besides other subvolumes, of course.

How to get lines which are unique for 1 column but are same for another column?

Posted: 25 Jun 2022 11:58 PM PDT

I am looking for an awk solution which would fetch lines which are unique based on 2nd column when the 1st & 3rd and 4th columns are the same.

constraints :

  1. column 3 and column 4 has to be same for the rows
  2. if 1 is true, check if column 1 is same for those rows from step 1.
  3. then check if rows from step 2 have same column 2 values , if not then print out the rows.

input file :-

AB|abcd|0001|Active  AB|efgh|0001|Active  AB|efgh|0001|Closed  CD|xyz|0002|Active  CD|pqr|0002|Active  EF|xyz|0003|Active  EF|xyz|0003|Closed    

output :-

AB|abcd|0001|Active  AB|efgh|0001|Active  CD|xyz|0002|Active  CD|pqr|0002|Active  

tried below code but it gives me same $2 values

awk -F'|' '    BEGIN{OFS=FS}    $4 ~ /Active/ && a[$3]++ && $2 != c {      print r ORS $0    }    {r=$0; c=$2}' <(sort -k3,3 file)  

Given a weekday name, week of a month, and a year, how to find the date

Posted: 25 Jun 2022 11:58 PM PDT

I can find the last Monday using date -d 'last-monday' +%F but given a weekday name, week of a month, and a year, how to find the date?

e.g. given: Monday, Week 4, June, 2022 output: 2022-06-20

given: Friday, Week 1, July, 2022 output: 2022-07-01

CentOS 7: yum can't find valid baseurl

Posted: 25 Jun 2022 10:19 PM PDT

In trying to install the latest version of R on CentOS 7 through EPEL, I ran the following command:

yum --enablerepo=epel clean metadata

After this, my yum install refuses to work and gives me the following output:

Failed to set locale, defaulting to C  Loaded plugins: fastestmirror, langpacks  Loading mirror speeds from cached hostfile       One of the configured repositories failed (Unknown),   and yum doesn't have enough cached data to continue. At this point the only   safe thing yum can do is fail. There are a few ways to work "fix" this:         1. Contact the upstream for the repository and get them to fix the problem.         2. Reconfigure the baseurl/etc. for the repository, to point to a working          upstream. This is most often useful if you are using a newer          distribution release than is supported by the repository (and the          packages for the previous distribution release still work).         3. Run the command with the repository temporarily disabled              yum --disablerepo=<repoid> ...         4. Disable the repository permanently, so yum won't use it by default. Yum          will then just ignore the repository until you permanently enable it          again or use --enablerepo for temporary usage:                yum-config-manager --disable <repoid>          or              subscription-manager repos --disable=<repoid>         5. Configure the failing repository to be skipped, if it is unavailable.          Note that yum will try to contact the repo. when it runs most commands,          so will have to try and fail each time (and thus. yum will be be much          slower). If it is a very temporary problem though, this is often a nice          compromise:                yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true    Cannot find a valid baseurl for repo: centosplus/7/x86_64  

I've tried the various solutions available to tackle this problem, but nothing works. I feel like I probably messed something up when I cleaned metadata, but I have no idea how to fix this. (I am unfamiliar with the inner workings of Linux OS)

kernel headers 5.19-rc2 and nvidia drivers

Posted: 25 Jun 2022 10:13 PM PDT

my problem: surly built 5.19-rc2 on a debian machine, works fine with nouveau driver but with nvidia-xconfig I don't get X to run. I installed nvidia-kernel-dkms and also tried the beta version without patches from nvidia website. I guess it's an old problem it can't find headers during installation for the uvm base driver. I have a kheaders.tar.xz in the source of the building tree. Tried to a) uncompress it as it is, b) made a directory in /usr/src/ called linux-headers-rc2; but misfortune. Is the driver available for the new kernel or should I stay at nouveau?

Kali linux raspi-firmware: missing /boot/firmware

Posted: 25 Jun 2022 10:10 PM PDT

Today I upgrade my Kali Linux and at the end of it, I get an error from dpkg about mission /boot/firmware.

Output of apt upgrade:

Reading package lists... Done  Building dependency tree... Done  Reading state information... Done  Calculating upgrade... Done  The following packages have been kept back:    nvidia-tesla-470-alternative nvidia-tesla-470-kernel-support  0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.  3 not fully installed or removed.  After this operation, 0 B of additional disk space will be used.  

Output of dkpg -C

The following packages have been unpacked but not yet configured.  They must be configured using dpkg --configure or the configure  menu option in dselect for them to work:   linux-image-amd64    Linux for 64-bit PCs (meta-package)    The following packages are only half configured, probably due to problems  configuring them the first time.  The configuration should be retried using  dpkg --configure <package> or the configure menu option in dselect:   initramfs-tools      generic modular initramfs generator (automation)   linux-image-5.18.0-kali2-amd64 Linux 5.18 for 64-bit PCs  

Proceeding with the upgrade will give the following message

I don't have anything to do with raspberry pi, and I found the following page about it. It looks like raspi-firmware has been removed from Kali's repository. How do I solve this error to install the remaining packages?

AWK command for summary statistics of array with several columns and a grouping variable

Posted: 25 Jun 2022 08:34 PM PDT

I got a data file with time-series data.

Each line of the 5+ GB csv file freqs.csv has the appearance: start_freq stop_freq measurement1 measurement2 ... measurementk

Frequencies are represented on several lines out of order relative to start_freq. There is a huge number of observations.

I need a one-pass-through calculation of min, max, mean, median, and count using build-in functions in awk or algorithms like those given by D. Knuth in The Art of Programming.

Summary statistics for each column measurement1 measurement2 ... measurementk grouped by start_freq and summary statistics in which we see all columns as repeated measurements of the same variable grouped by start_freq. I end up with summary statistics for between 10k and 100k variables.

The solution should not require a call to sort prior to the call to gawk. This again makes me think, that I should produce a C program instead of compiling a gawk call since I can then order the calculations in a vast array (100k rows times 6) before writing to disk, which of course requires a computer with plenty of RAM or a proper allocation scheme. Any opinions? I prefer a gawk based solution.

Thanks in advance.

Does the operating system affect the firmware

Posted: 26 Jun 2022 12:18 AM PDT

I don't know if this is the right place to ask this question but still please help me

My operating system (Debian) says that I have missing firmware something about i918). Debian documentation says that I can download it with the isenkram-cli package. But isn't the manufacturer of the computer the one who gives out firmware updates? Doesn't the operating system not affect the firmware?

Plymouth sticks around on multi-user.target boot

Posted: 25 Jun 2022 06:24 PM PDT

I boot my (Ubuntu) system as multi-user.target and log in with the text console. However at the point the boot is finished the plymouth splash screen stays until I press Ctrl-Alt-F2 then Ctrl-Alt-F1 at which point I can see the login prompt. There is no graphical indication that the boot is finished. How can I get plymouth to quit and show me the console login automatically?

Include spaces and tabs in "awk" search and replace

Posted: 25 Jun 2022 05:43 PM PDT

Another user helped me earlier to fix something I'm doing with awk, where I search for a string at any point in all files and replace two numbers in the same line when I find it.

awk -i inplace '/^gene_height/{ $3=sprintf("%.0f",(169+rand()*51));$5=sprintf("%.0f",(169+rand()*51)) }1' *  

This worked in the test files that I made (much fewer tags to read), but then in the actual files I'm trying to change for a Crusader Kings mod it's getting blocked because each line in the config file starts with a space then two tabs. I tried removing the "^" before gene_height and that kind of works, but it removes the space and two tabs from the file which might mess up the format and break the mod.

Does anyone know how I can get the above script to read files that start with a space, two tabs, THEN the string "gene_height", and keep the space and two tabs when doing the replacement?

How to run an arbitrary command from a Kwin script?

Posted: 25 Jun 2022 05:32 PM PDT

I want to run some commands when the active window changes in KDE. How can I do this from within a kwin script?

My use case is that I want to change monitor color preset for some applications, and another use case is to toggle input remap depending on active application.

There is a similar question: How can I run a kwin script from the command line? But this question is not related.

Previously, I could use Window Actions for X11 to partly solve the problem, but that UI was removed (see Bug 455444) as it does not work in Wayland.

I have heard that kwin scripts could not explicitly run an arbitrary commands, and the only way to interect with outside world is running dbus commands. But I am not completely sire about this statement. And if that is true, which is the dbus command, that runs an arbitrary shell command?

I tried searching, and found only few info. Question on reddit that says that maybe dbus call to krunner can help. I think this probably is a key to solve the task. And this another question, but it has nothing useful in answers.

Any help and code example would be appreciated.

Where is the "List files only" Nautilus' permission on terminal?

Posted: 25 Jun 2022 05:18 PM PDT

I found out that some folders may have the "List files only" permission on Nautilus. Others have "Access files". Both folders show the same on terminal, using ls -l command:

drwxr--r--    ...other info...  

I know what the drwxr--r-- part means, and I know that the "List files only" permission is not there.

So, where in the terminal can I see (or set) this different permission? Or the "List files only" are stored somewhere else? In this case, where?

I'm using Debian 11.3, Gnome 3.38.5 and Nautilus (Files) 3.38.2.

Increase the disk size on Debian 11 with btrfs filesystem

Posted: 25 Jun 2022 06:07 PM PDT

I have a Debian 11 system on VirtualBox VM, and I am now trying to increase its disk size.

I create this Debian 11 with btrfs file system for my main division at the beginning, so right now, it should already run on btrfs system with my existed volume.

What I already done:

use fdisk to create a new section from the volume I added in my vdi file use order fdisk /dev/sda, the new section called /dev/sda4

and

mkfs.btrfs -L extand /dev/sda4   

to make it a btrfs file system.

so right now:

fdisk -l shows:

Disk /dev/sda: 25 GiB, 26843545600 bytes, 52428800 sectors  Disk model: VBOX HARDDISK  Units: sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes  Disklabel type: gpt  Disk identifier: A5328659-9CBF-49AE-BF68-F9F4670D45C8    Device        Start      End  Sectors  Size Type  /dev/sda1      2048  1050623  1048576  512M EFI System  /dev/sda2   1050624  2050047   999424  488M Linux filesystem  /dev/sda3   2050048 16775167 14725120    7G Linux LVM  /dev/sda4  16775168 52428766 35653599   17G Linux filesystem      Disk /dev/mapper/debian--vg-root: 6.03 GiB, 6476005376 bytes, 12648448 sectors  Units: sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes      Disk /dev/mapper/debian--vg-swap_1: 976 MiB, 1023410176 bytes, 1998848 sectors  Units: sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes  

btrfs filesystem show :

Label: none  uuid: 3ea73e8c-64ac-442c-8c88-2675908cecdd          Total devices 1 FS bytes used 4.68GiB          devid    1 size 6.03GiB used 6.03GiB path /dev/mapper/debian--vg-root    Label: 'extand'  uuid: ef622e2c-9c19-415e-a8d7-6e60ef448bc2          Total devices 1 FS bytes used 192.00KiB          devid    1 size 17.00GiB used 536.00MiB path /dev/sda4  

df :

Filesystem                  1K-blocks    Used Available Use% Mounted on  udev                           990920       0    990920   0% /dev  tmpfs                          201748   20780    180968  11% /run  /dev/mapper/debian--vg-root   6324224 5103168         0 100% /  tmpfs                         1008720       0   1008720   0% /dev/shm  tmpfs                            5120       0      5120   0% /run/lock  /dev/sda2                      481642   87234    369423  20% /boot  /dev/sda1                      523244    3484    519760   1% /boot/efi  tmpfs                          201744       0    201744   0% /run/user/0  

What should I do next?

I tried the resize2fs, that doesn't work on btrfs file system, and I don't know how and where to mount the /dev/sda4 to use btrfs filesystem resize order.

Different $RANDOM results in sed when reading lines in multiple files

Posted: 25 Jun 2022 08:50 PM PDT

I'm trying to run a command that will read multiple files in a directory, look at each line of each file, and whenever it reads a specific string ("gene_height") on any line it replaces 2 numbers on that line with 170-220. For example in the following:

        complexion={ "complexion_3" 60 "complexion_3" 132 }          gene_height={ "normal_height" 192 "normal_height" 161 }  

It should see "gene_height" and replace 192 and 161 with random numbers from 170 to 220, but it should leave the 60 and 132 from the earlier line alone because it does not start with "gene_height". What I currently have almost works, the problem is it uses the same number for everything because it's really only running $RANDOM once per file and I can't find a good way to split it to work per-line instead.

Currently I am using:

for f in *.txt; do sed -i -e '/\bgene_height\b/ s/ [0-9][0-9]*/ '$((169+RANDOM%51))'/g' $f; done  

Any help is appreciated!

Script to find all empty git repositories on a machine

Posted: 26 Jun 2022 12:21 AM PDT

We know an empty git repository only has the .git directory in it.

I want to find all git repositories on a machine, which are empty.

I thought about this process:

  1. Find all directories that are named .git
  2. Exclude them if they are inside Trash
  3. Exclude others if they are not your repos (some third-party apps also pull git repos)
  4. Loop over them
  5. For each repo's parent directory, count its top-level files and folders
  6. If the count is zero (excluding .git) or is 1 (including .git), repo is empty. echo it.

And here's my script for this:

find / -type d -name .git 2>/dev/null |   {      while read gitFolder; do          if [[ $gitFolder == *"/Temp/"* ]]; then              continue;          fi          if [[ $gitFolder == *"/Trash/"* ]]; then              continue;          fi          if [[ $gitFolder == *"/opt/"* ]]; then              continue;          fi          parent=$(dirname $gitFolder);          echo "";          if [ $(ls $parent -A | wc -l ) != 1 ]; then              echo $parent          fi      done  }    

But this does not work as I expected it. It lists all of the repos which means I have a bug in my comparison part, that I can't find. What do I do wrong?

Also, I think it might not be the best approach. Any ideas on how to make it better?

How to get the "process IDs" which are logging output to stdout?

Posted: 25 Jun 2022 06:32 PM PDT

How do I get the PIDs of all the processes which are dumping output to stdout.

Sendmail with CSV file & plain body text

Posted: 25 Jun 2022 09:04 PM PDT

I am trying to send an email with CSV file as attachment and also print the data available in the text file as Email body using the below shell scripts. But im getting only attachment and there is no Email body available in the email which I have got after the execution of the below scripts , can someone help to resolve the issue.

Script Execution:

sh <script_name> CSV File 2012   

Code - 1 :

#!/bin/bash  export MAILTO="abc@hello.com"  export SUBJECT="Test - \"$1\""  export BODY="$2.txt"  export ATTACH_CSV=""$2"_"$3".csv"  csv_file=$( basename "$ATTACH_CSV" )  {  echo "To: $MAILTO"  echo "Subject: $SUBJECT"  echo "Content-Type: multipart/mixed; boundary=\"FILEBOUNDARY\""  echo "--FILEBOUNDARY"  echo "Content-Type: multipart/mixed; boundary=\"MSGBOUNDARY\""  echo "--MSGBOUNDARY"  echo "Content-Type: text/html; charset=iso-8859-1"  echo "Content-Transfer-Encoding: 8bit"  #echo "Content-Disposition: inline"  cat "$BODY"  echo "--MSGBOUNDARY--"  echo "--FILEBOUNDARY"  echo "Content-Type: text/csv"  echo "Content-Disposition: attachment; filename=\"${csv_file}\""  echo "Content-Transfer-Encoding: uuencode"  uuencode "$ATTACH_CSV" "$csv_file"  echo "--FILEBOUNDARY--"  } | sendmail -t    

Code - 2 :

#!/bin/bash  export MAILTO="abc@hello.com"  export SUBJECT="Test - \"$1\""  export BODY="$2.txt"  export ATTACH_CSV=""$2"_"$3".csv"  csv_file=$( basename "$ATTACH_CSV" )  {          echo "To: $MAILTO"          echo "Subject: $SUBJECT"          echo "Content-Type: multipart/mixed; boundary=\"FILEBOUNDARY\""            echo "--FILEBOUNDARY"          echo "Content-Type: multipart/alternative; boundary=\"MSGBOUNDARY\""            echo "--MSGBOUNDARY"          echo "Content-Type: text/plain; charset=iso-8859-1"          echo "Content-Transfer-Encoding: 8bit"          echo "Content-Disposition: inline"          cat "$BODY"          echo "--MSGBOUNDARY--"            echo "--FILEBOUNDARY"          echo "Content-Type: text/csv"          echo "Content-Disposition: attachment; filename=\"${csv_file}\""          echo "Content-Transfer-Encoding: uuencode"          uuencode "$ATTACH_CSV" "$csv_file"          echo "--FILEBOUNDARY--"  } | /usr/sbin/sendmail -t  

How is shell ctrl-C ctrl-Z sent over ssh?

Posted: 25 Jun 2022 08:06 PM PDT

I am trying to figure out exactly what is sent to an SSH host when I press CTRL-C in either putty or open ssh. All I am trying to do is send control codes pragmatically that are equivalent to when a user presses CTRL-Z for example. So far every time I send ^C or \cc or \003 it just prints it out. There must be some sort of additional information to let the terminal know it was ^C escaped?

Any help is appreciated. Thank you

Edit: I am pragmatically sending characters to an SSH session that is already connected to an SSH host. I want to see the same effect as when I have openssh client open and I press CTRL-C on my keyboard.

MQTT Error: Connection Lost

Posted: 25 Jun 2022 09:25 PM PDT

A 'listener' console was setup:

mosquitto_sub -h test.mosquitto.org -t "myTopic" -v  

mosquitto_pub returns an error:

pi@raspberrypi:~ $ mosquitto_pub -h test.mosquitto.org  -t 'myTopic' -m 'hello world'  **Error: The connection was lost.**  

What steps, from the command line, can be taken to diagnose if there is a syntax problem?

Update:

Replacing the MQTT server with iot.eclipse.org does not suffer the error and returns payloads as expected.

Listener console setup:

mosquitto_sub -h iot.eclipse.org -t "myTopic" -v  

Send payload:

mosquitto_pub -h iot.eclipse.org -t 'myTopic' -m 'hello world'  

mosquitto_pub returns:

pi@raspberrypi:~ $ mosquitto_sub -h iot.eclipse.org -t "myTopic" -v  myTopic hello world  

Publish a payload:

pi@raspberrypi:~ $ mosquitto_pub -h test.mosquitto.org  -t 'myTopic' -m 'hello world'  

Changing the MQTT broker demonstrates there is not a syntax error, however, the question remains why there is an error returned in the original testing

How to set the future permissions of content in folder

Posted: 25 Jun 2022 07:09 PM PDT

Let's say I am the user Alice and I have a publicly accessible folder /samba/public

The permissions of the public Samba folder (/samba/public/) are nobody:nogroup and 0777.

When Alice tries to copy over something from her home folder to the shared public drive

(e.g cp ~/Downloads/* /samba/public),

Alice wants the newly copied files to be editable/deletable by all guests who have access to the public Samba share.

I want the copied files to be owned by nobody:nogroup and set to 0777.

Instead, what happens is that the newly copied files are owned by alice:alice and guest users on the public drive can't edit or delete the files.

How can I ensure that future copy/move operations of content from Alice's home folder to the shared/public Samba folder will be owned by nobody:nogroup so that guest users aren't then prevented from deleting/editing the files themselves?

tmux select window with Alt<number>

Posted: 25 Jun 2022 10:03 PM PDT

In tmux to select a window, the default behavior is C-b <number>. I would like to avoid the prefix by using alt+ for a faster selecting.

I did it for the next and previous window, and it works:

 bind -n M-n select-window -n   bind -n M-p select-window -p  

For the selection by id, I did the same, but it does not work:

bind -n M-0 select-window -t 0  bind -n M-1 select-window -t 1  bind -n M-2 select-window -t 2  bind -n M-3 select-window -t 3  bind -n M-4 select-window -t 4  bind -n M-5 select-window -t 5  bind -n M-6 select-window -t 6  bind -n M-7 select-window -t 7  bind -n M-8 select-window -t 8  bind -n M-9 select-window -t 9  

Is there an easy way to make it working?

What is happening after kill -CONT <PID>?

Posted: 26 Jun 2022 12:03 AM PDT

I have suspend a process through kill -TSTP <pid>. Then tried to continue it with kill -CONT <pid>. But After completion of process, control is not returning to bash. Why this is happening? And what to do to overcome this problem?

I started the process (a shell script) from one bash (say bash-1) with ./name.sh. Then suspended that process with the command kill -TSTP <pid> through bash-2. Finally tried to resume it with kill -CONT <pid> through bash-2. But after completion of shell script, control is not returning, it just staying there forever.

Host a server with NGINX using VPN behind a NAT

Posted: 25 Jun 2022 05:23 PM PDT

so I was hosting a server using NGINX on a Raspberry Pi using a T-Mobile mobile router. All was working fine, till I noticed today that T-Mobile started to put me behind a NAT sometimes. So I heard you can still access the server if you set up a VPN network, but I have no idea on how to do it. I searched on the internet but didn't find any tutorials on how to do it using a mobile network, so I thought to ask here. Sorry if this question has been answered before.

I heard you can still accesd the server using VPN or SSH-Tunnelling here: https://superuser.com/questions/277218/ssh-access-to-office-host-behind-nat-router

Window not resizing on gnome shell

Posted: 25 Jun 2022 06:02 PM PDT

I am using archlinux with gnome shell 3.14.3-2 and I am unable to resize windows using eather alt+f8 or alt+space -> resize.

Pressing alt+f8 and the moving the mouse moves the window, while it is suppose to (and used to) resize it. Same goes for alt+space -> resize.

Has anyone even experienced the same issue ? Is there a known fix ?

Kali Live not booting, stuck on blinking cursor

Posted: 25 Jun 2022 11:00 PM PDT

I have a laptop which i have previously successfully installed Kali on to, i ended up installing debian over it later on for other purposes.

I have recently revived my interest in security and was intending to install Kali onto a partition on the free space on my hard drive. I created a bootable usb with unetbootin of the kali 1.0.9a image.

When i try and boot off the usb all that happens is it opening to a blank screen with a blinking cursor. I have read this could be related to graphics incompatibility but have not found any solutions. The laptop has on board Geforce GT 640m.

IF anyone knows what could be the problem any advice is appreciated :)

Cheers.

What exactly `systemctl --user enable SERVICE` means?

Posted: 25 Jun 2022 05:56 PM PDT

I expected systemctl --user enable SERVICE to start the service on login, which is not happening. Then what is it supposed to mean?

How are the processes in UNIX numbered?

Posted: 25 Jun 2022 07:12 PM PDT

I can't find any pattern when I look at the numbering of PIDs in process table (ps -a), as the PIDs are not subsequent numbers and sometimes there are large "gaps" between those numbers. Is it because there may be some processes that run for a short time and they reserve some PIDs? Is there some range, after which the numbering of processes resets?

I'm using Mac OS X but I guess that the answer should apply to UNIX in general.

No comments:

Post a Comment