Recent Questions - Unix & Linux Stack Exchange |
- How to install a certificate to sign files in CentOS?
- I can't see my hard disk in CentOs. How can I solve this?
- How to set 'No proxy' on Linux
- How to edit /etc/printcap?
- how to use sed to replace a string in double quoted with a variable?
- Why is /etc/fstab preferred over systemd unit files?
- Split several Unix files into multiple files based on first column
- Why am I able to SSH a remote machine even with the wrong keys?
- sshpass splitting the password as two strings seperated by the character "&" in password
- How to remove test results during the ramping period from a CSV test result file?
- Equivalent of executing a file (with shebang line) by entering its path?
- zsh completion: different completion when stdin is a pipe
- Debian 10 desktop frozen and has a small box appear
- Unable to detect a failed print on a remote system using ssh
- Unlock GRUB bootloader password remotely
- Fontconfig: set every font with spacing=100 as 'monospace'
- Why does find and exec mv not move all files?
- Does find -exec find all results up front, or will it find results added while executing on the previous results?
- grub2-mkconfig not using /etc/default/grub?
- Chaining find exec and a while loop
- SSH through HTTP proxy with corkscrew
- Dropping filename extensions with find -exec
- Piping Find and Move Command Output to a file
- Why does "find / -name '*.txt' | cp /junk" not work?
- How to decompress jsonlz4 files (Firefox bookmark backups) using the command line?
- Permission denied when using -exec {} ls with find command
- Dual displays, one fixed, one spinning (CentOS 7)
- Add driver to live distro?
- find -exec exit 1 \; Doesn't work neither does find -exec sh -c exit 1 \;
- ssh prompts for password despite ssh-copy-id
How to install a certificate to sign files in CentOS? Posted: 24 Aug 2021 09:55 AM PDT I have a .pfx certificate with which I want to sign XML files in a java application. This application will then send the signed XML files to an external server. I have investigated the directories of my CentOS server and I have seen that the How do I install the certificate? Thanks in advance |
I can't see my hard disk in CentOs. How can I solve this? Posted: 24 Aug 2021 09:50 AM PDT I have the main disk with Windows 7 and I installed CentOs in a flash USB but I want to delete data of main hard disk from Linux CentOs and make storage disk for store backups, I want to do something like that NSA server. My problem is that I can´t see the main hard disk in Linux, I don't know solve this. I tried with many commands, although it's not work. Thanks guys ! |
How to set 'No proxy' on Linux Posted: 24 Aug 2021 10:19 AM PDT |
Posted: 24 Aug 2021 09:09 AM PDT We recently changed domain and host name on a RHEL8 server from I happened to notice a reference in Correct hostname shows The server has been restarted a few times since changing the hostname. I found zero other references to
How do I change what's in the |
how to use sed to replace a string in double quoted with a variable? Posted: 24 Aug 2021 09:59 AM PDT the file include this line: My bash script will get a parameter like userdata_version=v2.21, how to use sed to replace anything between "" ("v1.16/") with $userdata_version? Cannot hard coded v1.16 as it is keeping on changing. |
Why is /etc/fstab preferred over systemd unit files? Posted: 24 Aug 2021 08:33 AM PDT The systemd.mount(5) man page says (emphasis mine):
Why is |
Split several Unix files into multiple files based on first column Posted: 24 Aug 2021 08:18 AM PDT I have several files (*data.txt) and I am trying to split each of them into multiple files based on the content of column 1. I have managed to split them but I do not know how to name the output files with both Thanks. |
Why am I able to SSH a remote machine even with the wrong keys? Posted: 24 Aug 2021 07:47 AM PDT Description: I have created a ssh connection between my Windows Pc and Raspberry Pi. To so I followed the following steps: Step 1: Somehow get the IP address of the Raspberry Pi. It should be something like this: 192.168.1.52 Step 2: Open a shell and access the Raspberry Pi via ssh: You will need the password. Step 3: In the home directory of the remote pc use these commands: Step 4: Secure the ssh connection via private/public key. In the local pc use this commands: If your local machine is Linux based run this line: Finally: Step 5: In the remote pc use these commands: and modify the following lines of the config file: Finally: Step 6: In the remote computer use these commands: Step 7: In the local computer run this command to log in to the remote one: Problem: When I perform all these steps again in my Ubuntu Pc by generating this time a key named fede_ubuntu, it looks like that I am able to ssh my Raspberry Pi no matter what I insert in the command: It works all the time and this is not supposed to happen since it should be restricted only to the key I just created. If I switch to my Windows machine everything works as expected and only if I specify the right key works. Question: Would you be able to suggest a possible reason of this issue and how to fix it please? EDIT: By typing the following command |
sshpass splitting the password as two strings seperated by the character "&" in password Posted: 24 Aug 2021 09:23 AM PDT I have a password variable PASS whose value is abc123&zxcv456 When I try to do SSH in jenkins using the password variable like below only the string before special character & is interpreted and the value of the variable PASS is read as abc123, any help to get around this? PS I have tried using escape character "${PASS}" but no progress there . |
How to remove test results during the ramping period from a CSV test result file? Posted: 24 Aug 2021 09:19 AM PDT I have some test results in a CSV file. The first field has the timestamp. Here is a sample record in the CSV file: I want to remove the test results during the ramp-up (5 minutes from the start time) and the ramp down period (last 5 minutes) and write the filtered test results into a CSV file. I tried with the hardcoded values |
Equivalent of executing a file (with shebang line) by entering its path? Posted: 24 Aug 2021 09:58 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. |
zsh completion: different completion when stdin is a pipe Posted: 24 Aug 2021 07:53 AM PDT I have a program or In first mode, the only optional argument is In second mode, there are 2 optional arguments How can I handle these 2 different modes in zsh completion? |
Debian 10 desktop frozen and has a small box appear Posted: 24 Aug 2021 07:47 AM PDT The graphical environment on my Debian 10 system has become unusable. The last thing I did was install On a restart I can move the box, which interacts with the three desktop icons. (Ie if it's moved above the icons, they move out of the way. (See images) As soon as I try and do anything but interact with the white box using anything but the left mouse button, the desktop locks. (Even the right mouse locks it up). Nothing is then responsive. I can get to console using Ctrl-Alt-F1, and have killed just about every process there is, to no avail. Somewhat new to linux, so unsure what the best way to ask for help is. |
Unable to detect a failed print on a remote system using ssh Posted: 24 Aug 2021 10:12 AM PDT Below is my code on linux that prints a PDF on a remote MACOS system. Here are the logs for a particular print The logs say that the print was successful and the return code was 0(successful). But, the print actually failed, and below is the snapshot of the same. Error: How can I refine my code so to make sure the print was actually successful? Below is the |
Unlock GRUB bootloader password remotely Posted: 24 Aug 2021 09:07 AM PDT Is it possible to unlock password protected grub loader remotely? For LUKS encrypted disk, I can unlock using |
Fontconfig: set every font with spacing=100 as 'monospace' Posted: 24 Aug 2021 08:29 AM PDT Many of the fonts, including those from the package manager (currently running a Arch System) don't include the generic family as "serif", "monospace" and "cursive". So I have to indicate the correct family manually (see also https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/). But for "monospace" fonts, there's a workaround: they all have the spacing property of 100. You can check this by running As an example, in the default configuration files and documentation, they set every font that don't have "serif" and "monospace" as "sans-serif" this way: So, I tried this: The result: EVERY font on the system is now monospace. This also happens changing For now, I used this command to generate a list of sources and added them all manually: |
Why does find and exec mv not move all files? Posted: 24 Aug 2021 09:36 AM PDT The current working directory has multiple test files numbered between 1 to 100. These are titled The command In contrast the command If the command The version of |
Posted: 24 Aug 2021 09:39 AM PDT So if I am downloading say 5000 audio files, each 5 seconds long, and after the first 1000 download, I run: Will that play only the 1000 files that were present when I first ran the command, or will it play all 5000 files since the files are downloading faster than the exec finishes with them? |
grub2-mkconfig not using /etc/default/grub? Posted: 24 Aug 2021 10:16 AM PDT I'm trying to add a kernel option "xxx" by adding it to the existing line in /etc/default/grub, but after doing so, when I run it produces exactly the same grub.cfg file as before (confirmed with diff). What am I missing? I'm running CentOS Linux release 7.6.1810 (Core) |
Chaining find exec and a while loop Posted: 24 Aug 2021 09:36 AM PDT I'm trying to stack a find command so that the results it returns only contains files with "warning:" or "error:" text within them. I also require those results in a specific format so I'm using I can get a version of this to work, but I need to be able to use Separately I can get these to work. Together I cannot. Here's an example of one I've got working: So now I'm trying to shoehorn that in with another process that limits the files to specific times, types etc. It's not going well: find /my/directory/here/ -type f -name *.log -mmin -480 -mmin +60 -exec grep -li warning: {} \; -exec grep -li error: {} \; | while read -r file; do -exec stat -c "$file" '%n|%y|%x|%s|%U|%u' {} \; done Note, the whole thing works if I remove the I know I'm not doing this right but I have no ideas right now on what I should be resolving first. |
SSH through HTTP proxy with corkscrew Posted: 24 Aug 2021 10:06 AM PDT I'm running into an issue connecting from a Cygwin terminal to my home Raspberry Pi with SSH from behind an HTTP proxy. It used-to-work™ and I don't know what changed since a few days ago (maybe the proxy filtering?). I can still connect from outside the proxy-ed network without corkscrew. Client-wise, my ssh-config is as follows: And the connection attempt gives this: Server-wise, /var/log/auth reports this: So the TCP connection seems broken, but I don't seem to have this issue when I try to connect with corkscrew directly (i.e. But then of course sshd doesn't know what to do of this... Any tip? Since I don't think I changed anything in my setup I suspect a sneaky update of the proxy filtering policy that puts me in this situation, but I have no way to be sure. I will try and update my router and Pi to use port 443 when I get home. |
Dropping filename extensions with find -exec Posted: 24 Aug 2021 09:37 AM PDT When using For example: Input filename: Output filename: Desired filename: |
Piping Find and Move Command Output to a file Posted: 24 Aug 2021 09:36 AM PDT I'm executing the following command and the output is not going to the |
Why does "find / -name '*.txt' | cp /junk" not work? Posted: 24 Aug 2021 09:37 AM PDT If I want to find any files with .txt in the name, and for every match that is found copy it into the /junk folder the following could be considered to work; but this will not work because find will produce the results as a list, which can't be fed into cp. So I could use xargs to resolve this Because xargs will change the list into one line which can be fed into cp. I also think that this command would completely finish searching through the files, 'produce the list', and only then would it run the right side of the pipe (the copy). Alternatively (and preferably) I could use exec Which would run the copy each time that a match is found, (and it would run the copy in a separate process, so the find command would continue running in parallel). Can someone confirm that these commands and my understanding is correct? I should add that this is for education purposes only, this is not a real life scenario. |
How to decompress jsonlz4 files (Firefox bookmark backups) using the command line? Posted: 24 Aug 2021 09:01 AM PDT There seems to be various JavaScript+browser specific ways of decompressing this, but isn't there some way to transform jsonlz4 files to something |
Permission denied when using -exec {} ls with find command Posted: 24 Aug 2021 09:38 AM PDT When run following command it gives me But if I do It prints gives the proper output without any What am I doing wrong? p.s. : I need to list and remove all the jar files in |
Dual displays, one fixed, one spinning (CentOS 7) Posted: 24 Aug 2021 09:02 AM PDT I have 2 monitors and would like to have my setup like this:
It was working like this at the beginning but somehow I changed that behavior. Now when I'm spinning both of them have multiple desktops which is a no no for me. Is there any way to set it up like it was before? I'm using latest GNOME. |
Posted: 24 Aug 2021 08:07 AM PDT I am using Lightweight Portable Security, and I need to add the FGLRX driver so I can boot it on my system (R9 200 is keeping it from booting). Is there a workaround? Is there a way I can just add the files to ISO image? |
find -exec exit 1 \; Doesn't work neither does find -exec sh -c exit 1 \; Posted: 24 Aug 2021 09:38 AM PDT Using Enterprise Linux 5/6, Bash 4.x I want this type of logic: The problem is find's -exec doesn't like builtins it seems. I know I can do an if then statement to check for the file and exit there, but I want to know how to do this in a find -exec (or I'd settle for a good xargs solution). |
ssh prompts for password despite ssh-copy-id Posted: 24 Aug 2021 07:57 AM PDT I've been using public key authentication on a remote server for some time now for remote shell use as well as for sshfs mounts. After forcing a umount of my sshfs directory, I noticed that ssh began to prompt me for a password. I tried purging the remote .ssh/authorized_keys from any mention the local machine, and I cleaned the local machine from references to the remote machine. I then repeated my ssh-copy-id, it prompted me for a password, and returned normally. But lo and behold, when I ssh to the remote server I am still prompted for a password. I'm a little confused as to what the issue could be, any suggestions? |
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