Recent Questions - Unix & Linux Stack Exchange |
- Why doesn't this bash function work? (tmux and docker related)
- Internet tethering from Samsung to kali linux rpi3
- FFmpeg is not giving the accurate audio duration
- What files should be deleted if i don't want anyone to know if the system has been once linked to the internet?
- How do you turn the exit status of a program into the signal name
- Bash autocomplete: select random suggestion
- I see the sizes of the files on a disk incorrectly
- SELF- TEST FAILED. Gnome disks
- How to verify if a given package is built in a reproducible way as an end user?
- Detect USB FT232R USB UART and run script
- Where are my lutris games saved?
- Adding exectuable directory to path has no effect
- Shell-script extract value pair with sed/awk?
- Substract date in custom format
- How can I see if a consecutive number name file is missing some file?
- Ansible - looping over all items in a list inside a dictionary
- cron: send error messages to file, when no MTA is installed
- How to block specific desktop notifications? [closed]
- Installing CUDA on Debian Machine 10.3
- Incorrect partition size on new disk
- Writeback cache (`dirty`) seems to be limited below the expected threshold where throttling starts. What is it being limited by?
- CentOS 7 - running FFMPEG as a service
- How to get only the name of the physical ethernet interface?
- Sound via HDMI on Arch Linux
- Blocking telegram using /etc/hosts
- Is there a shell command or utility for caching process output?
- Ffmpeg problems on centOS 5.8 64 bit
- How can I tell what version of Linux I'm using?
- Sunrise and other astronomical data from the command line
Why doesn't this bash function work? (tmux and docker related) Posted: 13 Oct 2021 11:03 AM PDT I often reattach a docker container running weechat, so I thought I'd make this function to rename the tmux window if within tmux, but tmux hangs and then crashes when I run it. Functions don't run within their own subshell, so I'm wondering what's going on here? |
Internet tethering from Samsung to kali linux rpi3 Posted: 13 Oct 2021 10:59 AM PDT I have a raspberry pi model 3 and I installed Kali Linux on it. I want to control it through my phone using SSH but I don't want to connect it to my phone's Internet using WiFi, instead I want to connect it using USB tethering. I tried editing Whenever I connect my phone to it and use the ip address command it detects the usbo but it says DOWN. What's wrong? |
FFmpeg is not giving the accurate audio duration Posted: 13 Oct 2021 10:25 AM PDT I have an audio file that I want to trim/cut from 00:00:10.840 to 00:00:15.520, but instead of output the audio for the giving specific duration, it output the audio five seconds more (trimmed to: 00:00:21.783)
|
Posted: 13 Oct 2021 10:18 AM PDT For certain reasons I have to delete all files that might indicate that the syatem has once been linked to the internet. I have deleted all the records in browser, and the internet ethernet address. What else I can do, such that no one is able to know that the system has linked to the internet? Can I delete all files in var/log? This is a new system with only the anaconda and relavant pachakges been installed. |
How do you turn the exit status of a program into the signal name Posted: 13 Oct 2021 11:11 AM PDT For example when the status=2, return the string "SIGINT" when the status=11, return the string "SIGSEGV". Is there a built_in c function that takes in the status and outputs the signal name? |
Bash autocomplete: select random suggestion Posted: 13 Oct 2021 10:33 AM PDT Basically I want a way for figlet to choose a random font. It doesn't seem to have an inbuilt method, or at least I haven't found one in the manual or in the web. I want the message to pop up every time I open up a new xterm, which is easy enough adding But I also want the font to be random. I'm wondering if there is a way for |
I see the sizes of the files on a disk incorrectly Posted: 13 Oct 2021 10:05 AM PDT Running services are filling up disk space. I reboot it frees up disk space. How can I find files created by programs in disk space but not visible with the "du -ch /.[!.]* /disk1" command. $ df -Th $ du -sh /disk1
Ubuntu 18.04.3 LTS The server is a virtual on xenserver. Two virtual disks named root and disk1 are attached. /disk1 size is 366GB but the file size is 205GB. The remaining 161GB space appears to be full, only 10GB of free space is available. More than one apache and special services running on this disk are working by showing this disk. But after a while the disk space gets full. |
SELF- TEST FAILED. Gnome disks Posted: 13 Oct 2021 09:32 AM PDT I tried to scan the disk health but got this error. Image: https://photos.app.goo.gl/oU7TxEnBjmuEcahh6 Help, please. Video: https://youtu.be/FEmR0C8Fhx8 I have back up to Google Drive so I am not worried at all. Thanks, Jonathan. The read error rate went from 1 to 2 fast. Does it need replacing? |
How to verify if a given package is built in a reproducible way as an end user? Posted: 13 Oct 2021 10:28 AM PDT Let's I would like to verify if the package If I now do and compare the checksum of the downloaded deb with the debian package I created locally, the checksum differs (expected as I did not sign the deb) How to make those checksums match ? |
Detect USB FT232R USB UART and run script Posted: 13 Oct 2021 09:26 AM PDT I have ser2net working perfectly with a USB FT232R UART (Creality 3D printer) using setserial to work with the higher speed of 250000 baud. The problem is that when I turn off the printer and turn back on, I have to run again the setserial commands to make the port available for ser2net. Is there a way to automate this upon connection? The commands i need to run:
Kind regards, Eric |
Where are my lutris games saved? Posted: 13 Oct 2021 09:20 AM PDT Where do I need to look for the directory where games installed with lutris are saved? I didn't find anything in ~/.local/share/lutris or in ~/.wine. |
Adding exectuable directory to path has no effect Posted: 13 Oct 2021 09:22 AM PDT I have a program called "spotbugs" that I would like to be able to run globally on my machine. It resides in a directory that I have, and i dependant on other files in the same directory. (it's the one called "spotbugs", here) If you google around for this, the most common answer is that it should be added to my path. So Go through the following steps: So this has no effect on anything, I am not able to run the executable anywhere other than when standing in it's directory. HOw else can I make it glboally available? |
Shell-script extract value pair with sed/awk? Posted: 13 Oct 2021 09:06 AM PDT Given a string like this: I want to get the values for each pair into into separate shell-script vars. So, for example, say we have three variables I want to load the values bla in the first variable, test in the second and 10 in the third. What I tried so far: But that would return the entire key-value pair, instead of just the value. Is there a nice way to do this with sed or awk? |
Substract date in custom format Posted: 13 Oct 2021 10:54 AM PDT I need to substract some date from current date to determine the age of some connections. The date is in this format: Example of input date: I got to the point of getting date in this format from I tried this, but this get problematic as soon as one number from connection date (like seconds) is bigger than current date. Example: connection has 53 as seconds and current seconds are 47. $line = connection date I also tried this (some code shamelessly stolen from stack exchange), but the output is wrong.. I would expect something like: Could I remove Maybe (almost certainly) I'm doing this completely wrong and there is much less complicated way of doing this. |
How can I see if a consecutive number name file is missing some file? Posted: 13 Oct 2021 10:03 AM PDT If I give Is there a way using |
Ansible - looping over all items in a list inside a dictionary Posted: 13 Oct 2021 09:28 AM PDT I'm using Ansible to find files on Windows machines using the I'd like to do this in 2 steps:
I managed to find directories with the example file, as well as fetching and uploading them, but for some reason I cannot find the directories first and then loop over them to search for the file. Here's what I'm trying to do: When I try using files in the To clarify, if I just search the entire root directory using recurse, this does work: With this method, however, I cannot mirror the directories on the remote location as they are on the host, since I think something is wrong with this bit: I've done my best to read the documentation and try other options and cannot figure this out. Any help would be greatly appreciated. Thanks! UPDATE: The results of the second loop ( So the file paths are in While this has not: returning How would I be able to loop over the files and extract their paths in this scenario? Thanks! |
cron: send error messages to file, when no MTA is installed Posted: 13 Oct 2021 11:00 AM PDT I get this message when there is an error in my crontab: I don't want to install a MTA on my system, but I also don't want to miss these error messages. Where is it configured, that cron tries to send these by mail? Can I change that, so that these messages are send to a file instead? (perhaps via sysylog). I don't want to log all cron messages, just the errors. I have this in my Unfortunately, it seems that even error messages have the How can I only log cron errors only? Or, in other words: how can I send to log file, what would otherwise be sent to MTA if it was installed? My system is Debian 10, and i am using UPDATE:using redirection for each line individually, as suggested by @basin is the solution I was using up until now, and it has few problems: First of all, as I stated, I would like a solution that redirects what would normally be sent to MTA by default to some other location, ie Second, if there is a syntax error in my crontab line, the redirection does not work. Cron still tries to send the error via MTA, and I get the Is there some way to redirect what would have ben sent via MTA, so that it is sent (either directly or via sysylog) to |
How to block specific desktop notifications? [closed] Posted: 13 Oct 2021 11:00 AM PDT I subscribe to the Boston Globe. I get unwanted news alerts from them as desktop notifications. I never asked for them. I don't want them. I contacted the Boston Globe and they won't help me. I logged on to bostonglobe.com and looked for a relevant setting - no luck. I get many desktop notifications. I only want to stop the ones from the Globe. I know how to programmatically throw up a notification, but I have no idea how to turn off or block specific notifications. And I would like to continue my Globe subscription. I'm running Pop!_OS 20.04 LTS and I login to i3 window manager. Thanks in advance. |
Installing CUDA on Debian Machine 10.3 Posted: 13 Oct 2021 09:47 AM PDT So, I am trying to install I am trying the instructions from here: So, I tried on Debian Machine: But, in the end, I get: Does any one have any clue, what is going on here? More logs on error: |
Incorrect partition size on new disk Posted: 13 Oct 2021 09:49 AM PDT I know this type of question has been asked frequently, but I cannot seem to figure out what is happening. tl;dr: I cloned an existing disk onto a larger disk, but I have a 10TB backup drive on my Debian system at I copied the original onto the new drive with The new drive has the files I expect. However, This is the case when the disk is first mounted; it's not like any existing operation is holding a file open. The output of as does Running I then tried to let I tried the I have searched for discussions of this fsck issue, without finding anything useful, and I have looked at some of the many discussions of discrepancies between I'd be grateful for any suggestions here. My files do seem to be on the new disk, so wiping it out and starting over again will take up many, many hours of recopying.... Edit: per request, output of |
Posted: 13 Oct 2021 09:15 AM PDT In a previous question and answer, I showed an experiment about dirty_ratio. I thought I solved the question, by correcting my understanding of the dirty ratio calculation. But I repeated the experiment just now, and the write-back cache was limited to lower than I saw before. I can't work this out, what could be limiting it? I have default values for the These ratios mean that reaching 10% causes background writeback to start, and 20% is the maximum size of the write-back cache. Additionally, I understand the write-back cache is limited by "I/O-less dirty throttling". When the write-back cache rises above 15%, processes which generate dirty pages e.g. with write() are "throttled". That is, the kernel causes the process to sleep inside the write() call. So the kernel can control the size of the write-back cache, by controlling the length of the sleeps. For references, see the answer to my previous question. But my observed "ratio" seems to stay distinctly lower than the 15% throttling threshold. There must be some factor I am missing! Why is this happening? In my previous test I saw values around 15-17.5% instead. My kernel is Linux The test is as follows: I ran For example, the first line in the quoted output: I found one thing that was limiting it, but not enough to see these results. I had been experimenting with setting Repeating the above test with The write test needs to be quite long to observe this reliably, e.g. 8GB. This test takes about 100 seconds. I am using a spinning hard disk. I tried testing with 4GB, and I only saw a dirty ratio of 0.129: As I say, this surprises me. I have an expert source from 2013, saying that |
CentOS 7 - running FFMPEG as a service Posted: 13 Oct 2021 11:03 AM PDT I'm writing some tests for a video streaming project. In order to check that I stream video correctly, I've set up a VM that runs a video client (e.g ffmpeg / vlc) as a daemon. I want that, on command, the client will connect to the server, display the video and save the video to a file. In order to do that, I've set a service. Here is my .service file: Ideally, I want this to be a user service. Sadly, my VM runs CentOS 7 which can not run user services. As a regular service, the $DISPLAY and $XAUTHORITY needs to be set as well, but I couldn't find any script that initializes them like in arch so I don't think it will be healthy to set them up myself. I'm also not sure how this is going to work if login is not automatic. The script itself does not work well even with just saving the video and not opening a graphical window. It does work well when launching it I've been thinking of running the script from a .profile, but I don't like this idea too much, it seems awkward (or sure if that is even a good option). Another option would be to set up the script via SSH (for example, using paramiko - which requires additional dependencies / scripts. I would really appreciate some suggestions / alternatives / ways of action, since I don't want it to hack this too much. Thanks, Joey. |
How to get only the name of the physical ethernet interface? Posted: 13 Oct 2021 09:09 AM PDT Is there a way to get only the name of physical ethernet interface(i.e not virtual ethernet interface)? |
Posted: 13 Oct 2021 10:40 AM PDT I've got my Toshiba laptop (Satellite A300) connected to my TV via HDMI. Using VLC 2.2.6, video works just fine. Currently, I'm trying to output sound to the TV's speakers.
I was able to play a test sound on the TV using Yet, when playing a file with VLC, the only option in How can I have VLC output the sound to the TV's speakers? |
Blocking telegram using /etc/hosts Posted: 13 Oct 2021 10:00 AM PDT I'm using /etc/hosts to block domains that I don't want to be accessible, and it works for most domains. However it doesn't seem to be working for the Telegram webchat (web.telegram.org). I have the following lines in my file: But I am still able to go on the site and use the full functionality of the web app. Am I doing something wrong? |
Is there a shell command or utility for caching process output? Posted: 13 Oct 2021 10:42 AM PDT Hope this is the right place to ask. Is there a unix tool that works similarly to this? Obviously echo wouldn't be the real use-case. Basically cache STDOUT, STDERR and status for a given command+arguments, so the next call to the same process doesn't have to re-run it. I could write a script that does it but I wondered if there was one in the unix toolset that I don't know about. |
Ffmpeg problems on centOS 5.8 64 bit Posted: 13 Oct 2021 10:07 AM PDT I did install Can anyone help? |
How can I tell what version of Linux I'm using? Posted: 13 Oct 2021 09:28 AM PDT Often times I will ssh into a new client's box to make changes to their website configuration without knowing much about the server configuration. I have seen a few ways to get information about the system you're using, but are there some standard commands to tell me what version of Unix/Linux I'm on and basic system information (like if it is a 64-bit system or not), and that sort of thing? Basically, if you just logged into a box and didn't know anything about it, what things would you check out and what commands would you use to do it? |
Sunrise and other astronomical data from the command line Posted: 13 Oct 2021 10:28 AM PDT Is there a simple open-source, command-line program that can show the sunrise and sunset times at a given date and location, and perhaps moon and planet data as well? Browsing the Debian package database and Google searches, I can't find anything relevant. This surprises me — considering the number of people who are both astronomy geeks and unix geeks, I'd have expected a de-facto-standard I am not interested in more complex programs that incidentally perform the calculations, such as sky maps (celestia, kstars, starplot, stellarium), earth maps (sunclock, xplanet), calendars/agendas (emacs, remind), clocks (glunarclock, wmsun), tide almanachs (xtide). There is perhaps What did I miss? |
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