Recent Questions - Unix & Linux Stack Exchange |
- issue with de duping a file record in linux
- Evenly formatted Ouput
- Locating pip configurations outside of pip.conf
- virtual machine (vmware workstation player) - full screen mode scales wrong
- Rsync, copying from two sources: how to avoid deletion of files from first source after syncing files from 2nd source to the same destination?
- After creating separate volume /var/log/ auditd rules for files inside it don't appear in list of active rules
- degraded iops and throughput on a linux machine in a cluster
- make changes the read-only filesystem in OpenELEC
- Linux Routing on Dual Network Interfaces
- LightDM running command after authenticating (pam_exec or other)
- sending csv file via unix
- Assigning curl output to variable only gives last line [duplicate]
- less doesn't page the output when called inside env
- Convert bash prompt in Terminal to zsh
- How to view an email message file (located in a MailDir) from the command line?
- rsync 100 files of size 30GB each from one remote server to an other in parallel
- How to fetch first regex result from file using bash, grep or sed?
- What does '/bin/bash: line 2: 30063 Killed' mean?
- nmtui-connection change my MAC address
- Swap super and ctrl keys in xmodmap
- .conf changes have no effect on reboot in WSL?
- Issue with kernel header files for installing VirtualBox on Debian
- Queue up commands while one command is being executed
- Can a disk be made to identify specific pending sectors?
- Starting Tomcat Service when starting CentOS/RHEL/Fedora
- Snort PCAP file analysing doesn't write to alert file
- iotop but for particular disk?
- Check if script is started by cron, rather than invoked manually
- How to create a testcolor.sh like the following screenshot?
- Non-Root Package Managers
issue with de duping a file record in linux Posted: 13 May 2021 11:10 AM PDT I was trying to compare the header of a file is matching with the header in reference file So i wrote both headers in a single file and trying to run the below query. But the same is returning both records instead of returning one record |
Posted: 13 May 2021 11:01 AM PDT In linux I have a file like below I need output like below |
Locating pip configurations outside of pip.conf Posted: 13 May 2021 10:48 AM PDT I am trying to modify pip to exclusively retrieve python packages from my Artifactory server instead of pypi. my /etc/pip.conf file has only configurations to hit my Artifactory repository however when analyzing network packets I can see I am still retrieving packages from pypi.org running the |
virtual machine (vmware workstation player) - full screen mode scales wrong Posted: 13 May 2021 09:44 AM PDT I use VMware workstation 16 player on my Windows10 main operating system. In the virtual machine I use a current version of Ubuntu. Entering the fullscreen-mode and choosing the option "cycle monitors" basically work, however there is still an issue: When I drag a window, for instance a shell, from my smaller monitor to the bigger monitor, the size of the window remains the same. In the bigger monitor I can then of course make the window bigger, but the size of the text withihn the shell remains the size from the smaller monitor. This leads more than less to unreadable text. Is there a way to fix this issue? Any input would be greatly appreciated. Best Simon |
Posted: 13 May 2021 09:40 AM PDT I have two source folders I would like to keep synced into the same destination folder. I usually give two separate commands: However, when giving the 2nd command, files that were copied from Do you know a way to keep a 1:1 copy of the two sources both syncing into the same destination? I know I could do something like this to resolve: But just wanted to check if I can still get the result as mentioned earlier. |
Posted: 13 May 2021 09:34 AM PDT I've created a separate logical volume Is there any way to troubleshoot rules addition? |
degraded iops and throughput on a linux machine in a cluster Posted: 13 May 2021 09:11 AM PDT we have a linux-based cluster on AWS with 8 workers. OS version (taken from /proc/version) is: Linux version 5.4.0-1029-aws (buildd@lcy01-amd64-021) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #30~18.04.1-Ubuntu SMP Tue Oct 20 11:09:25 UTC 2020 worker id 5 was added recently, and the problem that we see is that during times of high disk util% due to a burst of writes into the workers, the disk mounted to that worker's data dir (/dev/nvme1n1p1) shows a degraded performance in terms of w/sec and wMB/sec, which are much lower on that worker compared to the other 7 workers (~40% less iops and throughput on that broker). the data in this table was taken from running iostat -x on all the brokers, starting at the same time and ending after 3 hours during peak time. the cluster handles ~2M messages/sec. another strange behavior is that broker id 7 has ~40% more iops and throughput during bursts of writes compared to the other brokers. worker type is i3en.3xlarge with one nvme ssd 7.5TB. any idea as to what can cause such degraded performance in worker id 5 (or such a good performance on broker id 7)? this issue is causing the consumers from this cluster to lag during high writes because worker id 5 gets into high iowait, and in case some consumer reads gets into lag and performs reads from the disk then the iowait on worker id 5 climbs into ~70% and all consumers start to lag and also the producers get OOM due buffered messages that the broker doesn't accept. |
make changes the read-only filesystem in OpenELEC Posted: 13 May 2021 09:04 AM PDT i want to make changes on the read only filesystem in openelec / libreelec can somebody write me the command lines for making the system folder on usb and compressing it and the kernel to md5 after the changes that I make? Tnx |
Linux Routing on Dual Network Interfaces Posted: 13 May 2021 08:41 AM PDT I am trying to set up a system where a single server has 2 VLANs and 2 corresponding network interfaces. I want to be able to bind services to a specific interface so it only receives traffic that comes from that IP. This is the current setup: (I have replaced sensitive info with A,B,C,D) Currently all inbound traffic is being routed through However when I bind service B to the Also possibly useful to note that I am currently only using 1 routing table - the default one - this may have an impact but I'm not sure. The server is running RHEL 7.9. Any help/guidance is appreciated! |
LightDM running command after authenticating (pam_exec or other) Posted: 13 May 2021 10:54 AM PDT LightDM allows using
I want to run some command every time after LighDM authentication even after
|
Posted: 13 May 2021 08:39 AM PDT I am sending an email with content, subject and attachment on a Solaris system. Some users are receiving the mail ok with CSV file and everything, and some users are receiving a content in base64 style like hieroglyphs. The problem is, that when I send email to some domain is working and to some not. So my question is how to implement in a different way this part of code. It is a bash script and everything works fine (so I don't want to change all of it) but probably I have to change uuencode part. I can not use mutt or mail. I think Content Type "application/vnd.ms-excel" should be used in my case, but do not know how to implement all this. |
Assigning curl output to variable only gives last line [duplicate] Posted: 13 May 2021 08:30 AM PDT I am trying to do some tests to see if I can execute a shell script in a variables contents, similar to the Invoke-Expression function in powershell. I am getting the contents of the variable from curl:
however, whenever I print out the variable, it only gives the last line of the shell script. Is there something I'm missing here? I'm using |
less doesn't page the output when called inside env Posted: 13 May 2021 10:38 AM PDT After an update I noticed that my bash profile for To eliminate the effect of some environment variables, I tested with the minimal environment: or even: This also simply prints the file to stdout. On a different machine with the same software versions, the paging works (if Since even Versions of |
Convert bash prompt in Terminal to zsh Posted: 13 May 2021 08:07 AM PDT I had recently updated Terminal to use zsh, after doing so the prompt on new terminal windows now displays: Any suggestions for updating the bash profile to display customized prompts again within Terminal or cleaning up the default Terminal prompt to display desired device name, path, etc. using the zsh-based profile? |
How to view an email message file (located in a MailDir) from the command line? Posted: 13 May 2021 10:02 AM PDT I'm sure I once had a way to read email files from the commandline that was fall-off-a-log simple but I can't for the life of me find it again now. I have files in MailDir format, I wish to view their contents (headers, body (HTML/plain), MIME-decoded, extract attachments maybe). These aren't my emails; it's not that I want a MUA capable of fetching, sorting, sending mail for me - they're just raw files that I need to inspect. |
rsync 100 files of size 30GB each from one remote server to an other in parallel Posted: 13 May 2021 08:59 AM PDT I am in need to transfer 100 files of size 30GB each from one remote server to another. I have saved all the files I want to transfer in a file named
all the files are in such pair, I am using this command. This transfer the files one by one but I want to move all the files in parallel, I have a guaranteed bandwidth of 1 GBit/s. How I can make the most out of it? I am deleting the files after full transfer as well. |
How to fetch first regex result from file using bash, grep or sed? Posted: 13 May 2021 08:06 AM PDT I have a file called I need to get only 39.2. How can I achieve this ? |
What does '/bin/bash: line 2: 30063 Killed' mean? Posted: 13 May 2021 09:04 AM PDT I'm trying to install ps2dev a homebrew playstation 2 development toolchain and SDK But I'm having trouble compiling gcc 11.1.0 it stops at I'm quite litterally using my android phone running a linux emulator called UserLAnd running debian/ubuntu Android Version 8.1.0 (Oreo) Model Alcatel TCL LX A502DL Chipset Mediatek MT6739WM CPU 4x ARM Cortex-A53 @ 1105 MHz (1.1 GHz) GPU PowerVR GE8100 Instruction Set 64-bit ARMv8-A (32-bit Mode) RAM 2GB Internal Storage 16GB |
nmtui-connection change my MAC address Posted: 13 May 2021 08:41 AM PDT When I use How can I run |
Swap super and ctrl keys in xmodmap Posted: 13 May 2021 10:29 AM PDT I'm trying to swap my ctrl and super keys. I currently have successfully mapped the super keys to ctrl, now I need to map the ctrl keys to super, but I can't find a way to do so. Current code: Thanks in advance. |
.conf changes have no effect on reboot in WSL? Posted: 13 May 2021 09:12 AM PDT I've tried making some changes in various .conf files in my Ubuntu WSL2 install, such as editing When I do a However, if I do a |
Issue with kernel header files for installing VirtualBox on Debian Posted: 13 May 2021 11:01 AM PDT im trying to install virtual box-5.2 (got the .deb file from the website) on my Debian 9 stretch. Currently I have the Kernel: Linux 4.9.0 When I run: But when I am trying to install or upgrade the header files with: Could anyone help with this issue? Thanks! |
Queue up commands while one command is being executed Posted: 13 May 2021 09:40 AM PDT Suppose you run a command which takes some time to return and want to execute a different command after it has been executed but you didn't plan this in advance. I know that there is the option to press Ctrl + Z and then submit
I also know that you can just type in the next command while one command is being executed and then hit Enter to sumbit it. However, this also has two major flaws:
Is there a quick way to queue up more commands while one command is being executed, possibly involving using a special terminal emulator or several terminals? |
Can a disk be made to identify specific pending sectors? Posted: 13 May 2021 11:17 AM PDT
These are all used for mdraid arrays, so it's easily fixable by having mdraid scrub the array. But that takes a good long while (and hurts performance while its going). It'd be much quicker to selectively scrub only the parts that need it. Is there some way to get the list of pending sectors from the disk? I didn't see anything in These are all SATA disks. The machine is running Debian testing/unstable, if it matters. But I'd love to solve this on machines running Debian stable and oldstable as well. |
Starting Tomcat Service when starting CentOS/RHEL/Fedora Posted: 13 May 2021 09:00 AM PDT I want to install tomcat 8 and run it at startup time I am following these tutorials: I created the tomcat user: The file was in In the option 1: In the Option 2: I don't understand why this is needed in the start of option 2: I changed the ownership with Later But after restarting the CentOS 6.6, the service is not running. Testing: In other words $JAVA_HOME and $PATH aren't assigned!!! Trying to start manually (I did not assign password to tomcat user, which password should I use?): Running as Checking the account: Checking the ownership: Please help me. Question 1: The script was created in: Question 2 Is there a method to install a service without root privileges, that starts at boot time without intervention (e.g., sudo, su, etc)? |
Snort PCAP file analysing doesn't write to alert file Posted: 13 May 2021 10:00 AM PDT I'm using snort in my ubuntu 14.04 virtual machine. This is how I installed snort. I haven't change The PCAP file is successfully read and a snort.log file is created, but the size of that file is 0 bytes. When I installed snort, there was no alert file in /var/log/snort directory. So I created one and gave owner permission for snort as following. After the PCAP reading, both |
iotop but for particular disk? Posted: 13 May 2021 09:29 AM PDT Is there a tool like |
Check if script is started by cron, rather than invoked manually Posted: 13 May 2021 08:30 AM PDT Is there any variable that cron sets when it runs a program ? If the script is run by cron, I would like to skip some parts; otherwise invoke those parts. How can I know if the Bash script is started by cron ? |
How to create a testcolor.sh like the following screenshot? Posted: 13 May 2021 08:22 AM PDT I found this image on the internet, but don't know how was it made, Can anyone provide a sample on that? I just would like to have a color table as well. |
Posted: 13 May 2021 08:45 AM PDT From my research, I seem to notice that all package managers insist on being used as a privileged user and must be installed into Typically, what I like to do is create a throwaway account, compile some software, and install to However, compiling software becomes tedious. My experience is really just limited to Is there any reason why package managers must be used as a privleged user to install software? |
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