Recent Questions - Unix & Linux Stack Exchange |
- Installing man pages for section 9 (kernel routines)
- How to get disk space low alert?
- File operation difference and calculation - looping
- Use ls to list backup files only
- Backup of VM using "virsh snapshot-create-as" works once. Fails second time
- How to obtain system and user information from a mounted VMDK file?
- how to compare the lsblk disk size values to disk size values from df -h
- Are DRM/TTM Linux kernel module needed for a virtual machine with no graphical interface?
- Search for long string (>50 characters) and record match
- Why all versions of Android until now contains almost no GNU softwares?
- Can't set up environment path variables in new Kali Linux 2021.2 installation [duplicate]
- Website served on port 80 unreachable from my phone in the local subnet
- My sed command is throwing error sed: -e expression #1, char 22: unknown option to `s'
- Equivalent of executing a file (with shebang line) by entering its path?
- Unable to set PATH in linux kali
- How can i increment a number in each line that has the same number
- Can busybox unzip tool overwrite symlinks?
- Convert a date from DD-MM-YYYY to YYYY-MM-DD format in bash LINUX
- Any way to keep Stunnel from blowing up my logfiles?
- How to write Docker logs to a file in real time (à la `tail -f`)
- Lubuntu - G_Is_Dbus_Connection
- Allow a user group read,write execute access in Ubuntu 16.04 on a particular directory
- How to export CA certificate chain from PFX in PEM format without bag attributes
- If, elif and else shell script Linux statements
- What terminal emulators support tmux control mode?
- Equivalent of update-grub for RHEL/Fedora/CentOS systems?
- How to install drivers for intel GMA 3600 intergrated graphics system?
- sshfs LocalForward without config file
- How do I remove leading zeroes from output of 'date' or avoid octal interpretation of such decimal numbers?
Installing man pages for section 9 (kernel routines) Posted: 26 Aug 2021 10:52 AM PDT I am trying to make possible reading manuals for kernel-mode functions, such as
Running (I think How can I install/make/download those non-standard manpages for kernel functions to be able to run I know that similar questions was already asked, but they are deprecated (no |
How to get disk space low alert? Posted: 26 Aug 2021 10:35 AM PDT Our webserver hosted in pair.com uses now over 100% of allowed disk space which is 20GB. I try to create cron script which emails to 2 email addresses when used disk space is 95% full. I have this script but i can't figure out whats wrong: In my.pair.com ACC i have created cron job with correct path: $HOME/disk-usage-alert.sh and did sudo chmod u+x disk-usage-alert.sh and uploaded script to right folder /usr/home/ourshortnameinpair |
File operation difference and calculation - looping Posted: 26 Aug 2021 10:35 AM PDT i have 2 files. I need to find difference in percentage between these files value ( e.g 1st value of both files e.g 1.txt 2.txt i have written below code. |
Use ls to list backup files only Posted: 26 Aug 2021 10:50 AM PDT I have a large number of "backup" files of the form On bash, how do I use
|
Backup of VM using "virsh snapshot-create-as" works once. Fails second time Posted: 26 Aug 2021 09:44 AM PDT I'm running Ubuntu 20.04 with QEMU 4.2.1 and am trying to setup backups using these instructions: https://libvirt.org/kbase/live_full_disk_backup.html (older libvirt instructions, as Ubuntu 20 has older libvirt). The backup method works once, but fails when run a second time. This may be related to the instructions using a VM that has the VM disk as a .raw file, but I'm using a .qcow2. At this point have several VMs, so I'd rather not convert to .raw. When I run: Everything works, no errors. If I don't remove the "overlay1.qcow2" file and run the command again, I get this error: If I remove the file before running it again (as suggested by the instructions): Did some digging and ran the snapshot-list: Tried removing the snapshot: Not sure where to go from here. Thanks. |
How to obtain system and user information from a mounted VMDK file? Posted: 26 Aug 2021 10:25 AM PDT Looking for some help with obtaining (grabbing) data from a VMDK file that is mounted under (Ubuntu 20.04) Linux. The challenge is to mount the VMDK file and use CLI to obtain information on the VMDK installed Linux system instead of spinning it up in a VM or using Forensics tools on it. There are things I was able to obtain such as os-release, timezone, hostname, and filesystem type. I achieved it using the following commands:
While Here is where I'm unsure where to look and what to run. I need to collect the following data as well.
For #2 I think I could just use Suggestions on how to collect this data would be beyond helpful. Thank you. |
how to compare the lsblk disk size values to disk size values from df -h Posted: 26 Aug 2021 10:39 AM PDT I want to compare the size of the disk between the size from So we have the following from from df -h So I did the following in my bash script So I get from above value are not equal , in spite the values should be the same Any suggestion how to use " we are working on rhel 7.6 server |
Are DRM/TTM Linux kernel module needed for a virtual machine with no graphical interface? Posted: 26 Aug 2021 09:00 AM PDT In a VMware virtual machine, I have a Debian 11 with no graphical interface (but with an SSH server). I try to blacklist some unneeded kernel modules, like everything related to Bluetooth, HDMI, serial mouse and so. But for [DRM/TTM][1], I'm not sure of me: at first glance, I would say there is no need for a module managing the 3D of my graphical card. So I would blacklist the following in (before doing a But I wonder if my Linux distribution is natively made to use the GPU to do some calculation, to help the CPU, and if disabling the DRM would break this? And does this has a sense for virtual environments, as the GPU of a VM is mainly managed by the CPU of the hypervisor? |
Search for long string (>50 characters) and record match Posted: 26 Aug 2021 10:29 AM PDT I have a piece of code that looks for a string and then records if that matches. The code works fine when the string is not longer than 50 characters. However above this, say for a string of 100 or 150 characters it bases a match only on the first 50 characters in the string rather than the full 100/150 character string. Is there a way to make sure it counts matches based on the full string length? Im using an
(I know it would be easier to read if the lines were shorter, but the line length seems to be the whole issue here.) Any advice would be much appreciated |
Why all versions of Android until now contains almost no GNU softwares? Posted: 26 Aug 2021 07:31 AM PDT A GNU/Linux OS contain almost all GNU software ( But how does Android? It even does not have a terminal by default for mobile. Google has replaced most of them by non-free softwares developed by Google. Why Google did that? |
Can't set up environment path variables in new Kali Linux 2021.2 installation [duplicate] Posted: 26 Aug 2021 07:42 AM PDT I want to add environment path variable for some stuff as I did in kali linux 2019, but it's not working. In kali 2019 i put this: In 2021.2 I have tried to put this in: and it's not working. |
Website served on port 80 unreachable from my phone in the local subnet Posted: 26 Aug 2021 07:37 AM PDT I'm building a website on my laptop. To see how it renders, I serve it locally on port 80 with Now I want to test its responsive design, so I try to open the laptop address in my phone's browser:
There is something with the port. If I serve the website on port 3000 (as shown in lighttpd docs) or 8000 or 8080 it works: the phone's browser opens The phone seems not to be the culprit either: I can open the HTTP interface of the DSL box at 192.168.1.1, default port, without problem. (If asked to, I might try and use a computer client instead of the phone, but it's not easy for practical reasons.) If you wonder why I insist on serving it on port 80: it is built with Wordpress, and doesn't work right on a custom port, the plain text is shown but no css or images are loaded. I don't want to workaround the problem by tweaking Wordpress to make it custom-port-compatible, because when the site is ready I'll mirror it to a public server. |
My sed command is throwing error sed: -e expression #1, char 22: unknown option to `s' Posted: 26 Aug 2021 10:47 AM PDT I tried below command in my script and got error, Error Message, Please help me in correcting the command to avoid error. Thanks! |
Equivalent of executing a file (with shebang line) by entering its path? Posted: 26 Aug 2021 10:47 AM PDT Say I have a file hello: Provided the executable bit is set on that file, I can execute it by entering its path on the prompt: Is there a more explicit equivalent to the above? Something akin to: I know I can pass hello as an argument to My use case for this is to execute script files that do not have the executable flag set. These files are stored in a git repository, so I would like to avoid setting their executable flag or having to copy them to another location first. |
Unable to set PATH in linux kali Posted: 26 Aug 2021 07:27 AM PDT I've been trying to add a path but I'm unable to do so. I tried adding Thanks. Edit: I've added `export PATH="$PATH:/snap/bin:" as well. Didn't work. My shell is using zsh and not bash if that is relevant. |
How can i increment a number in each line that has the same number Posted: 26 Aug 2021 07:30 AM PDT Example a file has it Must become so no matter the text when it see 15000 just increment 1 on each lines |
Can busybox unzip tool overwrite symlinks? Posted: 26 Aug 2021 09:29 AM PDT I'm using the Busybox 1.32.0 package tools in an embedded device. When I'm in Ubuntu based x64 platforms, the unzip tool packaged there can extract over a destination directory without prompting any errors if I'm trying to extract a symlink. However, in the case of Busybox, when I try to do this and there's already a symlink with the same link stored there I get this error: Sure it's not a regular file, because it's actually a symlink. But what I want to do is either:
Is there any way to achieve this? |
Convert a date from DD-MM-YYYY to YYYY-MM-DD format in bash LINUX Posted: 26 Aug 2021 08:32 AM PDT Scenario: I am fetching a date value from a file into a variable and it is in DD-MM-YYYY format by default. I have to substract this date from system date. Subtraction is giving incorrect result if I had both dates in DD-MM-YYYY format. So I read a bit on google and decided to format both dates as YYYY-MM-DD as this will give correct value after subtraction. I have System date formatted successfully in YYYY-MM-DD, but facing a hard time to convert the date obtained from the file to YYYY-MM-DD format. Below solution works fine with single digit dates: but when I try to convert date in double digits like below: I get output Where: Desired output as -> I am working on RH Linux with Date version as: date (GNU coreutils) 8.22 Please help to provide a solution for above problem. |
Any way to keep Stunnel from blowing up my logfiles? Posted: 26 Aug 2021 07:30 AM PDT I have stunnel v5.44 (Ubuntu 18.04 v3:5.44-1ubuntu3) configured on a client to connect to a server in a screened subnet. The remote host has syslog configured to listen for logfiles over the stunnel connection. The client, of course, is configured to forward it's logs to the server over stunnel. This setup has worked great for years, but sometime last year (or year before? gawd 2020...), during OS upgrades (Ubuntu 16.04 and 18.04), something changed where stunnel is now spamming the logfiles with hundreds of error messages per second whenever the remote syslog server is rebooted or unavailable. In my clientside I thought |
How to write Docker logs to a file in real time (à la `tail -f`) Posted: 26 Aug 2021 08:00 AM PDT I docker that output logs stdout stderr, which can be viewed using: I also added 'sed', which puts the container id on each line: If I run it, I get something like: where "container112" is $LOGS_CONTAINER_ID. SO FAR SO GOOD. Now I want to output the above command to a file (log.out), so I wrote the following command: What happens is that it writes the logs to log.out, but it doesn't get new logs (if I open a new session and run But it also didn't work. What is the problem? |
Lubuntu - G_Is_Dbus_Connection Posted: 26 Aug 2021 08:02 AM PDT I have just installed Lubuntu on VM VirtrualBox. When I run an app from terminal, eg. firefox, it works but terminal pops up some warnings. It's not about firefox, the same issue with other apps. But if I start the same app not from terminal and then open terminal and run the same app from terminal - I do not have any warnings. Could someone explain it? How to solve it? Thanks |
Allow a user group read,write execute access in Ubuntu 16.04 on a particular directory Posted: 26 Aug 2021 09:07 AM PDT I want to grant a group "usera" rwx permission to a directory. The directory is already owned by a user that belongs to this group "usera". The name of the username and group is same. Current Permissions: If I check the current permissions of that directory by running the following command: Following is the output: Desired Output: Problem Statement: The problem is that the above-mentioned usera doesn't have ssh access to the server. So, I have to login via another user with admin privileges. And I want to grant group "usera" rwx permissions on a particular directory |
How to export CA certificate chain from PFX in PEM format without bag attributes Posted: 26 Aug 2021 10:17 AM PDT I have a PKCS12 file containing the full certificate chain and private key. I need to break it up into 3 files for an application. The 3 files I need are as follows (in PEM format):
This is a common task I have to perform, so I'm looking for a way to do this without any manual editing of the output. I tried the following: This works fine, however, the output contains bag attributes, which the application doesn't know how to handle. After some searching I found a suggested solution of passing the results through x509 to strip the bag attributes. This works, but I run into an issue on the cacert file. The output file only contains one of the 3 certs in the chain. Is there a way to avoid including the bag attributes in the output of the pkcs12 command, or a way to have the x509 command output include all the certificates? Additionally, if running it through x509 is the simplest solution, is there a way to pipe the output from pkcs12 into x509 instead of writing out the file twice? |
If, elif and else shell script Linux statements Posted: 26 Aug 2021 07:50 AM PDT I'm trying to make a shell script that allows me to create a user and then automatically add it into a group that they want to be in. The input is either a student or a teacher although i want to include these statements above but i can't seem to make it work because it just goes to to the 'if' statement and ignores if i use the input student. Could you please help me with this problem? |
What terminal emulators support tmux control mode? Posted: 26 Aug 2021 09:31 AM PDT
Are there other terminal emulators that support control mode? I am particularly interested in terminal emulators / SSH clients for Windows that might offer such functionality, but Linux/Unix ones are interesting as well. |
Equivalent of update-grub for RHEL/Fedora/CentOS systems? Posted: 26 Aug 2021 07:30 AM PDT In Ubuntu (and I guess in Debian too) there is a system script named Is there any similar command for Red Hat based distributions? If not, how do the system knows where is the grub configuration file to update when a new kernel version is installed? |
How to install drivers for intel GMA 3600 intergrated graphics system? Posted: 26 Aug 2021 10:03 AM PDT I am currently using crunchbang 11 32bit, on a laptop with Atom D2500/GMA3600. Does anyone know how to install a more modern driver - rather than the gma500? Is this even possible? |
sshfs LocalForward without config file Posted: 26 Aug 2021 09:40 AM PDT I'm trying to add portforwarding to my sshfs-mount-scripts: So far I've failed using the correct syntax. Using brackets or commas instead of spaces did not work. |
Posted: 26 Aug 2021 08:01 AM PDT I have this: I use festival to say it up.. but it says like: "zero nine hours".. I want it to say "nine hours"! but date always give me 09... so I wonder if bash can easly make that become just 9? in the complex script I tried like but it fails.. not octal :( any idea? |
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