Recent Questions - Unix & Linux Stack Exchange |
- how to get the evaluated text of bash output
- Can I skip syscalls made by the linker in strace?
- Incrontab to monitor a folder and email the file
- I have added port to firewalld but can not connect from outside
- When writing an ISO image to USB flash drive with dd, how do I know I can remove the stick?
- Use value variable with double quotes as command parameter, but without having single quotes
- gateway sends packets (L3) without data link layer (L2) connection
- gedit External Tools & Csound
- when using rsync, how to delete target file that is not complete?
- Extract first block of consecutively matching lines from a file?
- File manager that shows the actual path in the location bar after following a link
- There is no *BSD partition on /dev/sdb. The device (null) does not contain BSD disklabel
- How to create windows task scheduler in Linux/Unix
- Renaming the files and folders using text files
- How to add files to bootable linux setup ISO image copied to USB flash drive?
- Deal with nbsp character in shell
- Start a service when a user log in
- Impossible to set A2DP profile on bluetooth headset on Ubuntu 20.04
- How to configure an email-forwarding system, usable as "MX" record in DNS
- redirecting find standard output as an argument to tar command
- Disabling vbox services to decrease boot time
- Why are some Intel family 6 CPU models (Core 2, Pentium M) not supported by intel_idle?
- Redirect all incoming email to a Python script
- OpenVPN error status: 2, and can't connect to internet while using
- How can I make apache to start up automatically on linux mint?
- how to delete a header without deleting other rows in linux?
- How can I enable ufw automatically on boot?
- command to determine ports of a device (like /dev/ttyUSB0)
- mcrypt, EPEL and CentOS 6.4
| how to get the evaluated text of bash output Posted: 12 Sep 2021 10:07 AM PDT ok so when I run a command line it prints some output, and some of the text is different collors and there is some other formatting going on. When I get the string programmatically It has a bunch of control characters "The 'To' number +18 is not a valid phone number.\x1b[0m\n\n\x1b[37m\x1b[49m" printed directly out you get the text nicely formatted without all those control characters. If you highlight this text in putty and copy to notepad the text looks the same with the formatting removed. How can I get the evaluated text without the formatting? is there any such program? if you use echo it just reprints out the formatted text and maintains the formatting so that doesn't work. Thank you in advanced |
| Can I skip syscalls made by the linker in strace? Posted: 12 Sep 2021 10:06 AM PDT When I use The output from Is there a way to ignore the linker syscalls? |
| Incrontab to monitor a folder and email the file Posted: 12 Sep 2021 09:14 AM PDT I am trying to monitor one folder and want to be emailed the newly created file. Below is what I have. The mailFile.sh script works well independently, but I am not getting the files emailed. Code to email me a file: Incrontab to monitor the folder Any suggestions? |
| I have added port to firewalld but can not connect from outside Posted: 12 Sep 2021 09:03 AM PDT I'm working on Centos7 VPS and I have added port 9200 to my firewall status active zones status default zones if u notice my |
| When writing an ISO image to USB flash drive with dd, how do I know I can remove the stick? Posted: 12 Sep 2021 09:01 AM PDT When writing an ISO image to USB flash drive with I've seen Would the |
| Use value variable with double quotes as command parameter, but without having single quotes Posted: 12 Sep 2021 08:25 AM PDT I need to run something like But I need to run it inside this kind of bash script: But if I run this script the command that start is and not How to have |
| gateway sends packets (L3) without data link layer (L2) connection Posted: 12 Sep 2021 08:12 AM PDT pretty straightforward question: at 16:33:42 my gateway (on my 3g router) looks unuable to contact my machine (achille) because I have flushed arp table, I keep flushing it so there is no updates sent to the gw. There is no routing to the gw neither (this should prevent my machine broadcasting arp requests?). So the gw is yelling through arp broadcasts but how could she send me 2 packets on port 443 at 16:33:52 (knowing that there is no complete data-link layer connection? thanx folks!! |
| Posted: 12 Sep 2021 08:34 AM PDT I am a newbie at Linux and so far so good my workflow of studying music with Csound is adding a new tool under the External Tools Gedit plugin doing this, which is a text file containing the Csound syntax that later is interpreted as noise... There is any way to identify the path of the file I am in, instead of using a main text file every time ('/home/ye53b/Desktop/TC4R37A7B/music/csound')? |
| when using rsync, how to delete target file that is not complete? Posted: 12 Sep 2021 08:07 AM PDT I have a hard drive with a few tb capacity and want to distribute all files to multiple smaller disks. So for example 8 tb -> 4 * 2 tb. I thought using rsync with remove-from-source, so successfull transfers are deleted, so I can always see how much is left to copy. When a drive runs full, rsync will eventually stop, I change the drive, and start rsync again, rsync only copies the files that failed previously. But in my tests I noticed that if a file is transfered that is bigger than the space left, the partial file stills stays there. It is not removed on the origin, but it still exists on the target. That could get confusing later if I have the same file with different sizes. Can rsync remove the partial failed file from the target? I looked at all the delete options, but none of them seem to do what I want. Thanks. |
| Extract first block of consecutively matching lines from a file? Posted: 12 Sep 2021 08:33 AM PDT So I have a file like this: And I want to extract all the lines matching regex The desired result of extraction should be How do I do this? I think I can extract all consecutively matching lines with regex in multiline mode, but I only want the first part of the match. Update: I want regex
|
| File manager that shows the actual path in the location bar after following a link Posted: 12 Sep 2021 07:00 AM PDT I'm looking for a Linux file manager that shows the "actual" path (as printed by pwd) in its location/address bar when following a link. When I open links on my desktop (say in thunar), the location bar shows: /home/Username/Desktop/MyFolder although the linked folder is actually located at: /home/Username/Some/Long/Path/MyFolder Consequently, the "Open parent folder" button of the file manager, takes me to the desktop rather than to the actual parent folder (/home/Username/Some/Long/Path). I'm looking for a file manager that uses the actual location in its location bar, so that "Open parent folder" takes me to the real parent directory. I would really appreciate if someone could tell which which (if any) file managers have this feature. I've looked at quite a few but never found what I was looking for. I use various Debian flavours and Fedora, but would be willing to switch to any distribution if required. Thanks for your help :) |
| There is no *BSD partition on /dev/sdb. The device (null) does not contain BSD disklabel Posted: 12 Sep 2021 06:35 AM PDT I want to add files to my Debian setup USB flash drive and am trying to follow the steps from this answer: https://unix.stackexchange.com/a/559371 However, after successfully writing the image with This is what the stick looks like: What does the error message mean? Where am I doing wrong? How can I add the partition instead? |
| How to create windows task scheduler in Linux/Unix Posted: 12 Sep 2021 06:32 AM PDT I have created a windows batch file script for checking a service & starting it if its in stopped mode than I mapped that script with Windows task scheduler to run in every 5 min with system privileges on that machine. Below is the batch script. I dont have much knowledge on Linux/Unix however we can do this by creating some shell script & mapping that script with crontab hence I am looking some help here to create linux/unix script which look for a specific process & if its not running try restating it, also sometime process is not starting because of "processname dead but subsys locked" if we can also include that in script to handle and after that adding script to crontab for running in every 5 min. |
| Renaming the files and folders using text files Posted: 12 Sep 2021 10:05 AM PDT I am trying to rename the files and directories using a text file separated by space. The files.txt looks like this: My command is as follows: The files look like this (in directory 1): The output for the files should look like this (in the dir1-1): The files in directory (dir2) looks like this: The output should look like this: This command can rename only folders from dir1-1 to dir1_1 and dir2-1to dir223_1so on but it doesn't rename the files in the subdirectories. The files in the corresponding directories also have these prefix of these directories. (like dir1-1.txt dir1-1.gzip dir1-1.csv) It will be somewhat similar like: Script for renaming files using text file containing alternate file names Looking forward for the assistance. |
| How to add files to bootable linux setup ISO image copied to USB flash drive? Posted: 12 Sep 2021 06:20 AM PDT I use to write the debian-11.0.0-amd64-netinst.iso ISO file to my USB flash drive and then I can boot from it and start the setup. However, I want to add some files to the USB flash drive to make them available during setup. How do I do that? The stick is somehow marked read-only and |
| Deal with nbsp character in shell Posted: 12 Sep 2021 08:04 AM PDT When I use an "alt-gr" character followed by a 'space' character often I miss my input in typing in place of it the "non breaking space character" aka nbsp. Example with piped commands : So I found a solution which works perfectly in my case, to simply neutralizing the nbsp character : But this changement gains instantly the whole system and for the proof, in LibreOffice Writer if I want to add a nbsp character between two words which must stay grouped, this does not working. From past, I lost a lot of time to determine what was the cause of a non working command or a script or a service which does not start, because of that damn character. So I asked to myself if there is a solution to make the neutralisation limited only to the shell (console, terminal, vty, tty, and so) ? In bash or other shell ... Could you give me what role this damn nbsp character have in shell ? Where and when using it and for what ? What we loose to not using it ? Another suggestion : instead of neutralize it can we reveal it by a graphic character with color ? So based on Kamil's suggestion, I disabled nbsp character from all X environment with setxkbmap because this functionnality do not serve me in nearly 95% of time and for the 5% remaining, I will have to implement a distinct patch for all the applications which need it. For Libre Office Writer I propose to use the Ctrl-Shift-space to do the replace. So for the macro (Available here : Tools → Macros → Organize Macros → LOdev Basic → My macros > Standard > Module1 > Edit) : Nota : notice that the NBSP unicode code is U+00A0 and furthermore in my case the resulting code is written at And for the key bindding (Tools → Customize… → Keyboard), we will use Ctrl-Shift-space to bind with the macro's function named InsertNBSP Nota : in my case the resulting association is written at |
| Start a service when a user log in Posted: 12 Sep 2021 09:41 AM PDT I use Jellyfin (a mediacenter like kody). It works as service. But, I don't need it to run everytime. I created a kid account with custom desktop to make it as safe as possible and I want to start Jellyfin service (as root) ONLY when kid user log in, and stop it when user log out. I don't want to start service when system start, but only for this user. I found lots of topics about how to start service AS another user, but not WHEN a user log in. Many thanks ! :) Update #1I can run script when kid user log by editing this file But I have a perms problem. Can I chmod a service to be started by everyone? |
| Impossible to set A2DP profile on bluetooth headset on Ubuntu 20.04 Posted: 12 Sep 2021 07:06 AM PDT I know this was asked a lot of times, but honestly I've tried everything that I could find over the internet and still couldn't resolve this. I am a beginner user of Ubuntu 20.04 and I am having issues setting A2DP profile for a pair of bluetooth headset, and the quality is very bad.
After this I've tried to:
I have also checked I've edited the With In So after mixing all the steps above and restarted bluetooth and re paired headphone a million times, I gave up and I'm writing for help. Please give any hint on what could be the issue. Thanks |
| How to configure an email-forwarding system, usable as "MX" record in DNS Posted: 12 Sep 2021 09:27 AM PDT Context: let's say I have the domain How can I configure The DNS record would probably be something like: |
| redirecting find standard output as an argument to tar command Posted: 12 Sep 2021 09:46 AM PDT can't understand why we used both isn't |
| Disabling vbox services to decrease boot time Posted: 12 Sep 2021 08:19 AM PDT I did a Now, I also have Note that `vboxdrv.service' takes the longest time, around 43 seconds, which is almost 90% of the total boot time. My question is: Is it safe to disable both of these services with: |
| Why are some Intel family 6 CPU models (Core 2, Pentium M) not supported by intel_idle? Posted: 12 Sep 2021 10:18 AM PDT I've been tuning my Linux kernel for Intel Core 2 Quad (Yorkfield) processors, and I noticed the following messages from PowerTop shows only states C1, C2 and C3 being used for the package and individual cores: Curious, I queried
Looking at the kernel source code, the current intel_idle driver contains a debug message specifically noting that some Intel family 6 models are not supported by the driver: An earlier fork (November 22, 2010) of intel_idle.c shows anticipated support for Core 2 processors (model 23 actually covers both Core 2 Duo and Quad):
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment