Recent Questions - Unix & Linux Stack Exchange |
- How to convert a multiple choice text file into a json file with indents
- Does a physical volume need filesystem before extending logical volume with it?
- Cannot install Debian when CSM is disabled
- Whats the difference of the available memory shown by using sar (system activity report) command and /proc/meminfo?
- Trouble to get a ipv6 address with dhclient/console lines
- Invoke a program in a Bash script with command line parameters stored in a variable
- run command on and in subfolders which contain files of specific extension
- Append checksum value in trailer
- How to retrive information like PID, PPID, Level in bash of all processes which have descendant processes more than six?
- Tilde and angle bracket keys are swapped
- Sync files only by changed modification time
- Cannot shutdown the host when QEMU/KVM is installed
- Can't create a bootable SD card for Gumstix Overo because i can't partition the sd card correctly
- WARNING ** : bad d-i Packages file (time distortion or clock problem)
- Bash using variables within variables within command
- Recent files and locations listed in Dolphin and other applications are very old, date is false
- How can I best track agrs in the environment without using ps?
- why cannot bash map CTRL^C to intr signal if invoked as init?
- Which process is responsible for mapping Ctr+C to intr signal in systemd+agetty+login+bash?
- Boot taking forever with a 106 JBOD attached. - WARNING: Device /dev/xxx not initialized in udev database even after waiting 10000000 microseconds
- Script to set screen resolution by providing X and Y co-ordinates in redhat
- Automate Alpine Linux installation
- Why the LESS_TERMCAP settings does not work when put it into ~/.profile
- dd command ruining files [closed]
- Suspend laptop when closing lid
- This system is currently not set up to build kernel modules
- python easy_install or pip errors about sysconfig
- How to check easily the munin alert-email-notification?
- How to exit a git merge asking for commit message?
- Mac OS X: Terminal Prompt Username
How to convert a multiple choice text file into a json file with indents Posted: 17 Feb 2022 10:51 AM PST How can i convert a text file into a json output like below? Text file: Question:'Which of the following commands can be used to perform a full text search on all available packages on a Debian system? a.opt1 b.opt2 c.opt3 d.opt4 e.opt5 { type:'radio', question:'Which of the following commands can be used to perform a full text search on all available packages on a Debian system?', correct answer:'dpkg', options:[ {a:'apt', correct:false, selected:false}, {a:'apt-cache', correct:false, selected:false}, {a:'apt-get', correct:false, selected:false}, {a:'apt-search', correct:false, selected:false}, {a:'dpkg',correct:true, selected:false}, ], | ||||||||||||||||||||||||
Does a physical volume need filesystem before extending logical volume with it? Posted: 17 Feb 2022 10:43 AM PST I have an existing logical volume and I want to extend it with newly added physical volume (from separate disk) in the volume group. Before extending the logical volume, is it required to make filesystem for the physical volume or not? I know the logical volume itself has a filesystem, but I don't exactly understand how the extending process works in practice. | ||||||||||||||||||||||||
Cannot install Debian when CSM is disabled Posted: 17 Feb 2022 10:54 AM PST I am trying to install Debian 11.2.0 (debian-11.2.0-amd64-netinst.iso) on an old Lenovo ThinkCentre M92p (Intel Core i5-3470). I upgraded BIOS to latest version (9SKT9CA, released on December 24th 2018) and disabled CSM. Installer works fine until following two errors are thrown.
When I select continue…
I am installing Debian on an empty exFAT-formatted Samsung T7 Touch SSD… no other operating system is present besides live installer. What am I missing? Thanks for helping out! | ||||||||||||||||||||||||
Posted: 17 Feb 2022 10:01 AM PST On the same machine, entering "sar -r ALL" shows: kbmemfree kbavail kbmemused %memused ... 157096 232380 561828 56.48 ... Then, entering "cat /proc/meminfo" shows: MemTotal: 994824 kB MemFree: 135700 kB MemAvailable: 212988 kB ... What is the difference between the available memory shown by the above two commands? Can these two values be seen as the same? Neither of them includes swap? | ||||||||||||||||||||||||
Trouble to get a ipv6 address with dhclient/console lines Posted: 17 Feb 2022 09:52 AM PST I have issues to get an ipv6 address when using the command dhclient -6 to connect my PC to gateway by wifi. I have those logs when I use dhclient -6 -v I don't have the same issue when using the non ipv6 command to renew my computer address by dhcp. Also when I connect my PC to Gateway manually (with the graphical interface) I can see that I have an inet6 local and global address, so the issue only happens with command lines. I also can set a static address IPV6 with the following command Any idea how to solve the issue, i am opened to the idea of using other command than dhclient provided it can works with command lines. | ||||||||||||||||||||||||
Invoke a program in a Bash script with command line parameters stored in a variable Posted: 17 Feb 2022 09:37 AM PST Is it possible to invoke some program in a Bash script with complete command line parameters (both the key and the value) stored in variables? I use the following I want to store some of the parameters in variables. I tried this, concerning the but this doesn't work, Storing only the value for the but I'd like to be variable about the switches, and I'd also like to customize multiple switches without knowing which will be set. So is it possible to store not only the values for command line options in a variable, but also the option switch(es) along with the value(s)? | ||||||||||||||||||||||||
run command on and in subfolders which contain files of specific extension Posted: 17 Feb 2022 10:55 AM PST Good day all, I'm trying to run commands on subfolders which contain files with specific extension(s). I want to run the commands inside the folders themselves, and have whatever output be generated inside the folders themselves. Here is an illustration of what I'm trying to accomplish. I have this to start: I want to find subfolder 1 and 3 in this case, and have commands run inside them, and have the outputs of said commands also be within their respective folders as so This code works, ran inside But when I would want it to generate as follows So to recap: I want to test subfolders for the presence of files with specific extensions, and then I want to run commands inside the folders that have them, and have the generated outputs all be inside the folders in which they were created. I want to run commands on every file of specific extension it finds inside the folder, but also on a wildcard I'm basically trying to How can I accomplish this? Thanks in advance. | ||||||||||||||||||||||||
Append checksum value in trailer Posted: 17 Feb 2022 10:50 AM PST I want to append SHA256 checksum hash value to trailer record of a file
Used below command to obtain 64 digit alpha numeric hash value
My expected output file would be
But I got the below output using below command
| ||||||||||||||||||||||||
Posted: 17 Feb 2022 08:51 AM PST I will trigger seven dummy descendant processes using below code: Thus
How do I display the information of the dummy process in below format, actually for a particular user($USER) I want to display every process information who have descendants more than six in below format.
Frankly I do not know Bash scripting. I have just learned how to to display PID'S of a user processes using below command:
| ||||||||||||||||||||||||
Tilde and angle bracket keys are swapped Posted: 17 Feb 2022 07:59 AM PST I have looked for solutions to this problem quite a bit now, and I haven't found any good answers to it. When pressing the tilde key (the one to the left of 1), it instead outputs an angle bracket, and the layout screen shows that the button to the left of Z is pressed. The same goes for the opposite, when pressing the angle bracket key (left of Z), it shows that the tilde key is pressed instead. I have no clue when this started to happen, nor do I know why this happened. I would love for some tips or directions on how to fix this issue as it is quite annoying. System information: OS: Debian Bookworm DE: Cinnamon/GNOME (issue is present on both) Physical keyboard layout is Norwegian | ||||||||||||||||||||||||
Sync files only by changed modification time Posted: 17 Feb 2022 07:42 AM PST Is there a way to sync files only by changed modification time? I back up my data to a archive system that moves files to tape after some amount of time. The moved files leave a symbolic link with the same modification time, but size and checksum are different, so rsync will recopy the file. I tried rclone with --ignore-size but it didn't do what I wanted. | ||||||||||||||||||||||||
Cannot shutdown the host when QEMU/KVM is installed Posted: 17 Feb 2022 07:42 AM PST I have a problem with LIBVIRT or something. The host is Linux Fedora 34 on AMD and the guest VM is Windows 10. Virt-manager is connected through user session. I am fairly new to Linux, but I recently switched to QEMU/KVM from Virtualbox and guest VM itself is working fine. My problem is that every time I want to reboot or shutdown my host system, first stop job for Virtualization daemon is running for about 6 minutes and then shutdown sequence finishes but my host computer does not power down or reboots itself as used to and I have to hold down the power button to turn off host machine. I tried to shutdown the guest VM before host shutdown but with no luck. Secondly, whenever I stop libvirtd.service in linux I just cannot restart it without completely rebooting my host computer. What to do? | ||||||||||||||||||||||||
Can't create a bootable SD card for Gumstix Overo because i can't partition the sd card correctly Posted: 17 Feb 2022 07:36 AM PST So i was trying to create a bootable SD card, for Gumstix Overo, through this link https://www.gumstix.com/community/support/getting-started/create-bootable-microsd-card/ but every time i try to partition the sd card using the command after the command And we can that it didn't create another partition: But changed it's name in devices: i'm using VirtualBox with Ubuntu 14.04 in case you are wondering. | ||||||||||||||||||||||||
WARNING ** : bad d-i Packages file (time distortion or clock problem) Posted: 17 Feb 2022 07:28 AM PST I install a linux archive via an old NAS in flash kernel boot, and after struggling with the packages, apt fires me on that: Any idea ? knowing that ntp/date/timedatectl doesn't exist obviously Source tuto : https://github.com/Dees7/openstora/blob/master/pages/How_to_install_Debian_Linux_on_NETGEAR_Stora.md Step #Running the installer | ||||||||||||||||||||||||
Bash using variables within variables within command Posted: 17 Feb 2022 07:17 AM PST I have a couple of curl commands, one to fetch an authentication key and then another that needs to use that key, currently i have the below bash script. The issue is looking at the verbose output of the second curl command i see: So the content of the variable access content (which the test echo statement shows does contain the right value) isn't being used and instead the string "$ACCESS_TOKEN" is used. I did have a look at Quoting within $(command substitution) in Bash and wrapping the command with the additional double quotes but this made no difference. Can anyone spot whats wrong here? | ||||||||||||||||||||||||
Recent files and locations listed in Dolphin and other applications are very old, date is false Posted: 17 Feb 2022 08:04 AM PST I have noticed that files and locations shown in Dolphin (and thus in KDE file dialog too) under 'Recent files' and 'Recent locations' are not recent at all. All I see is files (in 'Recent Files') and folders (in 'Recent Locations') from my system but that I am 100% sure I have not accessed in months, while the system seems to think that happened a few minutes ago. But I have also noticed that recent files and recent applications are also askew in the Application Dashboard launcher too: they are too old, 'recent files' there are those from the list in Dolphin, the 'recent applications' have not been used at all in weeks or even months! It is as if those lists are stuck in time, at a certain date when I've looked at those foobar2000 icons and files: That time information saying number of minutes or some hour "today" is completely false: I had nothing to do with those files in months! The same incorrect "recent" files and folders are listed by Discussing here I see that Surely, these are the ones that should be listed in Dolphin panel "Recent" too. Could this be a bug or is it a problem with my system? This is in Kubuntu 22.04 (updated from 20.04, where I had the same problem), Plasma 5.24., Dolphin 21.12.2.) | ||||||||||||||||||||||||
How can I best track agrs in the environment without using ps? Posted: 17 Feb 2022 09:19 AM PST I am working with a customer However, the where
Is 1 second a wide enough window for env args? Is there a better solution to this problem? Maybe there is something to be done with Thanks :-) | ||||||||||||||||||||||||
why cannot bash map CTRL^C to intr signal if invoked as init? Posted: 17 Feb 2022 07:22 AM PST If I make the bash as the first process invoked (i.e as init), as a result it will display the following: and any signal doesn't work.(e.g CTRL^C). Through reading the source code of bash-5.1.12, the problem is located at the expression in job.c line 4501: and the error value is ENOTTY, which mean that the calling process does not have a controlling terminal. So what are the relations between a controlling termial and signals and why is the bash invoked as init without a controlling terminal ? | ||||||||||||||||||||||||
Which process is responsible for mapping Ctr+C to intr signal in systemd+agetty+login+bash? Posted: 17 Feb 2022 07:23 AM PST I am trying to read source code to understand which process is reponsible for these mapping, but I can't still figure it out. Can anyone give me a hint about which code is relative to it ? source code: agetty+login(util-linux project), systemd | ||||||||||||||||||||||||
Posted: 17 Feb 2022 08:09 AM PST When attaching a 106 JBOD enclsoures (106 18TB drives via HBA card) to a Debian Bullseye server, i get spammed with the following for each path to any of the 106 drives. It makes a reboot take a huge amount of time. Example: What is causing this? I seem unable to figure out. | ||||||||||||||||||||||||
Script to set screen resolution by providing X and Y co-ordinates in redhat Posted: 17 Feb 2022 08:14 AM PST Goal is to provide resolution X and Y as arguments to the script (./res_set.sh 1920 1080) and gtf, xrandr newmode and addmode will be executed according to the script. This creates xrandr newmode but fails to add the mode (addmode) in the resolution list while using this script. I get xrandr:Cannot find mode. But it works and adds to the mode list if xrandr newmode and addmode commands are executed individually. This is output of My thoughts are : Are $variables are in different datatype and spoiling my result ? How will I able to verify the datatype of variables here or in bash (does it matter) ? | ||||||||||||||||||||||||
Automate Alpine Linux installation Posted: 17 Feb 2022 07:13 AM PST I am trying to achieve unattended Alpine Linux installation. I went through the Alpine automatic installation guide but many manual interventions are still needed during the installation! For example providing the root user name, creating the answer file ( Is there any way to include the answer file inside the ISO image, select the root user by default before starting the installation and set its password after the installation is done. In CentOS we can provide kickstart file in Is there something similar in Alpine Linux ? | ||||||||||||||||||||||||
Why the LESS_TERMCAP settings does not work when put it into ~/.profile Posted: 17 Feb 2022 07:32 AM PST I have the following LESS_TERMCAP settings: When I put into Since I was taught to keep the environment variables into non-login shell config files, such as Further information: Best regards. | ||||||||||||||||||||||||
dd command ruining files [closed] Posted: 17 Feb 2022 09:25 AM PST I recently was trying to flash from an IMG file with I don't know if I'm being stupid, or if it's a drive error. This is the code I used: | ||||||||||||||||||||||||
Suspend laptop when closing lid Posted: 17 Feb 2022 07:24 AM PST My laptop does not suspend when I close the lid. I have the default settings in Suspicious to me is, that when I look at Suspending from the command line works just fine. How can I suspend my laptop when the lid is closed? Edit: I am on Arch Linux with i3. Edit2: I checked the state of the lid like this: Then closed the lid for a while, opened it again. I always got the same output: Edit 3: | ||||||||||||||||||||||||
This system is currently not set up to build kernel modules Posted: 17 Feb 2022 10:07 AM PST I'm trying to install VirtualBox 6.1.16 on a LinuxMint 19.3 host which is based on Ubuntu 18.04 bionic. I have checked all other answers and tried all possibilities, but to no avail. Previously I had VirtualBox 6.0 which I uninstalled before installing 6.1 . I'm getting the following error message:
So far I've tried:
This is the log file: but nothing is helping. I'm really at a loss here. Many thanks in advance. | ||||||||||||||||||||||||
python easy_install or pip errors about sysconfig Posted: 17 Feb 2022 09:04 AM PST somehow the installation of python is broken in my linux OEL 6.9. pip or easy_install are broken and I cannot do anything. i get the same error on both sides: I removed python-setuptools to no avail. I think i was trying to update latest version of pyOpenSSL and it crashed and cannot fix. we are running Oracle enterprise Linux 6.6 in a VM. how to fix it without resorting to installing python 2.7 which is not included in the official repos thank you | ||||||||||||||||||||||||
How to check easily the munin alert-email-notification? Posted: 17 Feb 2022 08:05 AM PST I run the munin monitoring application on my debian Wheezy server and I would like to test the alert-email-notification procedure. To do that, I add in munin.conf the following line: I set 25 because the df command returns 30 for /home. I also defined one contact: Unfortunately I don't receive any mails. There are no errors in the logs. Note that I use exim4 to send emails and that I can send emails from a terminal. What could be wrong in my configuration ? Note also I ckecked manually the df plugin: returns 30 for /home | ||||||||||||||||||||||||
How to exit a git merge asking for commit message? Posted: 17 Feb 2022 09:43 AM PST I'm using git. I did a normal merge, but it keeps asking this: And even if I write something, I can't exit from here. I can't find docs explaining this. How should I do? | ||||||||||||||||||||||||
Mac OS X: Terminal Prompt Username Posted: 17 Feb 2022 09:38 AM PST I'm using Mac OS Snow Leopard (v10.6.8). I've changed the account name under I did not rename the home directory under |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment