Questions tagged [unix]

Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

argument to pgrep from cmdline returns 2 PID's and argument from global variable value returns 1 PID

1.first case(processName as argument from cmd i.e java) command from cmd with arguments : ./a.sh getProcessId contains java code: getProcessId(){ matchType=$1 #defaulting matchArg to x i.e exact ...
Nitin Alety's user avatar
0 votes
1 answer
104 views

pgrep -f from shell script is returning 2 pid instead of 1

code : function main { [ -z "$@" ] && { getProcessId "$@" } || "$@" } getProcessId(){ matchType=$1 #defaulting matchArg to x i.e exact match matchArg=x ...
Nitin Alety's user avatar
0 votes
2 answers
68 views

change shell to /usr/bin/false in IBM aix os

I would define the program run for the user at session initiation into /usr/bin/false in /etc/passwd. The default value parameter is /usr/bin/ksh. When I try to modify it with commands: bash-5.1# ...
medisamm's user avatar
  • 111
0 votes
1 answer
91 views

kubectl get nodes --kubeconfig admin.kubeconfig returns "No resources found"

I am a newbie in Kubernetes. I am not even very familiar with basic kubernetes commands, but the installation is a starting point for my learning journey. I wanted to avoid installing something like ...
Debapriya Roy's user avatar
0 votes
0 answers
51 views

not able to send mail with attachment from linux ubuntu : 20.04 by using email mailutils (sendmail keyword)

code : subject="Service resilience service status" body="Service is down" from="[email protected]" to="[email protected]" attachment="/home/ubuntu/...
Nitin Alety's user avatar
-2 votes
1 answer
57 views

Is it bad that I don't update the server? [closed]

I am running an application on my server with the help of Nodejs, and it has many dependencies such as Chrome. I have not updated my server for two years. I am afraid that if I do, my code will fail ...
Hypothesis's user avatar
0 votes
0 answers
25 views

Need help in logrotation

I have custom logrotation as below.. cat /etc/logrotate.d/apache # # /var/log/apache/apache.log { daily rotate 30 size 1G compress missingok ...
xrkr's user avatar
  • 413
1 vote
1 answer
119 views

nginx fowarding 20% (spaces) instead of + in url

I have an NGINX config that takes url's converts them with regular expression, this works fine. The issue is that while forwarding to the new atlassian instance the + from the URL is turned into %20 ...
Joeri_Damian's user avatar
0 votes
1 answer
177 views

is /etc/sudoers writable or not

The default permission in /etc/sudoers file is readonly for root and group root as in picture is obvious : So when you open it with any test editor it can't be written and give error read only. now ...
Salar's user avatar
  • 164
1 vote
0 answers
81 views

Mount a remote GPU locally on Rocky Linux

I am doing some work on a server which has 1TB RAM, 100CPUs, and 1000TB storage. My work involves very large datasets. One specific I am trying to run would benefit immensely from a GPU, it is ML ...
donkey's user avatar
  • 63
1 vote
3 answers
583 views

How to have an environment variable with quotes in crontab?

I have a minimum example of my problem, which is trying to install a crontab that looks like this: FOO="foo\"bar\"bin" 0 0 1 * * ls by running crontab crontab (I have it in a ...
Pablo Fernandez's user avatar
0 votes
1 answer
193 views

Passing a user input to an ssh command

I'm currently trying to create a shell script that will execute a mysqldump on a remote mysql database and then copy the output file back to my local machine. The problem I'm running into is that I ...
pbuchheit's user avatar
  • 171
0 votes
0 answers
96 views

Apache 2.4 unixgroup authentication not working

Require unix-group is not working for me when configuring the VirtualHost for my Apache server. Whenever I log in using pwauth, the server still authenticates users who are not members of the group ...
Anish G.'s user avatar
0 votes
1 answer
729 views

Send STDERR to console and file, STDOUT to file only

I have some script with STDOUT and STDERR output. By default, both STDOUT and STDERR goes to console: ./script.sh I can redirect STDOUT to file, leaving STDERR output in console: ./script.sh > log....
AntonioK's user avatar
  • 613
0 votes
0 answers
65 views

How to Find which Program is generating given .dat File

I have a file in a folder on the server with ".dat" extension. I want to find which program file is generating this file. How should I find this using putty?
Toohina Barua's user avatar
0 votes
0 answers
83 views

Linux Debian ACL, is default mask overriden by something in FTP?

I have an Linux Debain 10 server running an web project. The project (parent) folder is as follows: ls -la: drwxrwxr--+ 7 some_user some_group 4096 Jul 21 11:01 . getfacl: # file: . # owner: ...
Jiří Žák's user avatar
0 votes
1 answer
302 views

sed not working on large files. Any other options available?

Trying to insert a line feed on large files in UNIX when a text string matches. Any file around 1GB or less, it works. Anything over that size, it does not complete the replace. It appears to do ...
TimBurke's user avatar
0 votes
0 answers
144 views

Add mac address in rsyslog template

I am trying to add system/device mac address in syslog. No solution is working for me. Following command gives me mac address, just wanted to use in rsyslog template. mac_addr=$(ifconfig en0 | awk '/...
sandip karanjekar's user avatar
0 votes
0 answers
38 views

Cant ssh to ec2 created from AMI of recently patched server

One of my ec2 instance "patched-server-1" was running of kernel version 4.18.0-240.1.1.el8_3.x86_64 and then I did patched the server and current kernel version is 4.18.0-425.19.2.el8_7....
sunny's user avatar
  • 1
0 votes
0 answers
230 views

ldap+sssd on SuSE shows only local users

Problem: Not able to list ldap users. Hello, I am setting up new LDAP authentication on our SuSE 12 test system. I am a LDAP newbie and following the instructions from the site https://www.port389.org/...
Sachin H's user avatar
0 votes
0 answers
915 views

Can't enable the PHP DOM extension

I have a server that has PHP 7.4.3 installed, but it doesn't load PHP-DOM. It's not listed in php -m or php -i, nor when I load PHP on a page. Here's what I tried so far: Ran sudo apt-get install php-...
lastnoob's user avatar
  • 101
0 votes
1 answer
45 views

How to protect Jenkins from super users?

Any super user who has access to the Jenkins running on a Linux server can easily disable security authentication from config.xml file; then log in and can also decrypt sensitive passwords from ...
user avatar
1 vote
1 answer
586 views

'mail' not working in Script same way it is working from command line

The below line of code/command is working as expected if I run it from Unix terminal, but not if I include it in a script and run the script - exact same. I am expecting the X-Priority to show the ...
akpuvvada's user avatar
0 votes
0 answers
138 views

How do you get resize2fs to actually fit to your filesystem?

Using Ubuntu Mint here, 20.1 Cinnamon. I'm trying to reduce a SD partition as much as possible, but when use resize2fs sudo e2fsck -f /dev/sdb2 sudo resize2fs -M /dev/sdb2 it resizes the partition to ...
Silverlord's user avatar
0 votes
2 answers
327 views

Adding users to Unix groups only if said groups exist (puppet)

I tried using the 'group' attribute of the 'user' resource like so : user { "user": group => ["docker", "www-data"] } If the groups 'docker' and 'www-data' exist ...
hamid's user avatar
  • 1
-2 votes
1 answer
156 views

transfer file from Unix to a writeable Windows share, if I don't have direct login rights to the latter

I'm an sa on Unix side, and there is a writeable Windows share, which I can access from my desktop using an AD service account. How can I batch a file transfer from Unix over to that mount (it's not ...
access_granted's user avatar
0 votes
1 answer
78 views

Way to know the current shell in a given terminal

I have a shell on a Unix system. Is there a command that can tell me which shell I am working ? (bash, zsh, etc. )
Bob5421's user avatar
  • 361
-1 votes
1 answer
44 views

Linux analyze and monitoring log tool?

I have a server using OS centos-7, but sometimes my server got slow with some processes. I want to check which service or process makes the system slow. how to check the percentage of CPU, ram, or ...
bopea's user avatar
  • 1
0 votes
0 answers
250 views

Failed to connect to remote MySQL server via proxy

I am trying to use an R tool in which RMySQL is one of the package being used. I am working this on ubuntu behind a corporate proxy but having the following issue for three days persistently. Error ...
7-x's user avatar
  • 1
1 vote
1 answer
1k views

Does information piped through a Unix socket touch disk?

I'm trying to understand how fast different IPC mechanisms are, and I know it's possible to create a Unix Socket as a "file" in a directory on a filesystem, but what I don't understand is ...
Christopher Shroba's user avatar
2 votes
0 answers
364 views

Is there a utility for detecting temporary system freezes?

Is there a (unix) utility which is able to detect temporary system freezes by observation? E.g. I could imagine an utility which continuously fetches the system time, sleeps for a specific amount of ...
MRalwasser's user avatar
0 votes
1 answer
39 views

Single SSH login for multilpe machines?

I have a number of physical (desktop) machines running at the office as part of a new network to handle processing & serving Open Source data; some of these machines also house VMs. At the moment, ...
Michael Hillman's user avatar
0 votes
1 answer
271 views

Geting UNIX Timestamp while logging history

I am running below bash script which is saving the history in a file, however it is logging the history with Unix epoch timestamp. I need the timestamp in human readable format. _who_am_i=$(who am i|...
Dinesh Kumar's user avatar
1 vote
1 answer
1k views

Why some companies like cisco follow different syslog messaging format rather than rfc 3164 (BSD syslog) and rfc 5424 (IETF syslog)?

According to my understanding the popular syslog formats are: RFC 3124 (BSD syslog): Format: < priority >timestamp hostname application: message Example: <133>Feb 25 14:09:07 webserver ...
Allan's user avatar
  • 15
-2 votes
1 answer
374 views

Why an operating system would like to be POSIX compliant? [closed]

What's the big deal around POSIX and how it interferes in the overall usage of an Operating System?
Ricardo Silva's user avatar
0 votes
1 answer
446 views

Nginx reverse proxy when port is already in use?

i am trying to close port with basic authentication (for pushgateway of prometheus), so not a big specialist in nginx, so could someone please give me and advice where i am is wrong? I have 9091 port, ...
Nigrimmist's user avatar
0 votes
2 answers
139 views

Issue using dd to write 1GB file to zfs dataset on FreeBSD 13

Hey guys I am turning up a little FAMP stack on an Azure VM. 4 Xeon cores 16GB ram. Second SSD is using ZFS and the boot drive is UFS2 (Default). When I dd if=/dev/zero of=testfile bs=1024 count=...
Zork's user avatar
  • 1
1 vote
0 answers
1k views

Replace a string from the cat output

I need to replace a string with the string which is mentioned in a file abcd.txt in all files in a folder. For eg: I want to replace a string 'apple' with whatever the cat output of this file abcd.txt ...
Am3Y's user avatar
  • 77
1 vote
0 answers
794 views

Copying files from remote to local using lftp in unix

I'm trying to write a script to copy some files from a remote ftp server to a local directory. I have seen lots of examples using the mirror command of lftp but so far none of them seem to work. ...
pbuchheit's user avatar
  • 171
0 votes
0 answers
154 views

NextCloud : Can you use encrypted drives / file level encryption?

I am evaluating NextCloud for a solution for which I have a requirement that files cannot exist on non encrypted disks or the files themselves cannot be individually read or cached. I have read a lot ...
Alex's user avatar
  • 355
0 votes
1 answer
436 views

What is the maximum value acceptable for xargs -P argument? [duplicate]

In this answer they mention 10 I did man xargs and couldn't find what's the maximum limit. Is it possible to send 10000 cURL requests per second? How about 50000 cURL requests per second? I mean all ...
sofs1's user avatar
  • 103
0 votes
1 answer
240 views

What was linux/unix time standard before inventing epoch? [closed]

As in the title, I was looking for, but hadn't found. How were time stored and processed before epoch standardizing in 2000?
Piotr's user avatar
  • 11
0 votes
2 answers
2k views

How to edit the middle of host name (%h) in ssh config?

In ssh config you can easily edit a hostname by appending or prepending it with something. For example, when you want to connect to server with ssh test5, but actually the server name is test5.mail, ...
Ashark's user avatar
  • 346
0 votes
0 answers
592 views

change fastcgi directory in nginx configuration

i am not sure how to write the proper title i have 5 ajax requests that gonna execute postgresql query in php here is the directory /var/www/webgis.com: 1. webgis.html 2. php(directory) -query1....
astaga's user avatar
  • 1
0 votes
1 answer
365 views

finding docker images with tag and name

when I do docker images I have below docker images as list where there are images with multiple tag and also image with latest tag value. REPOSITORY TAG ...
Alex's user avatar
  • 182
0 votes
1 answer
723 views

What is igrid server - port 19000?

Recently our monitoring tools is reporting a port as down, the port number is 19000. I have never seen this port before and I don't find out good information. Doing some tests, I've seen I can telnet ...
Astora's user avatar
  • 161
0 votes
1 answer
493 views

Samba username mapping not working as desired

I have the following username mapping in Samba: master = johndoe user2 user3 regular = user5 user6 restricted = johndoe user8 user9 By default, Samba will always map johndoe to the last entry in ...
Șerban's user avatar
0 votes
0 answers
452 views

lsyncd include specific files exclude rest

I am using lsyncd version 2.2.2. here is my current code. settings { logfile = "/etc/lsyncd.log", statusFile = "/etc/lsyncd.status", insist = true, } sync { default.rsyncssh, ...
Armen Geo's user avatar
0 votes
2 answers
155 views

Is SSH remote execution more secure as local non-root?

Is there a security benefit running a command remotely via ssh as a local non-root user? In other words, is this actually more dangerous compared to executing the ssh command as non-root: root@local:~#...
morrow's user avatar
  • 11
1 vote
0 answers
52 views

How to ensure execution of time consuming task on reboot/shutdown?

I have a bash script that is supposed to execute on reboot/shutdown of a remote Ubuntu server, connected over SSH: ls /etc/rc{0,6}.d/k99* /etc/rc0.d/k99_stop_all /etc/rc6.d/k99_stop_all The script ...
Sergey Bushmanov's user avatar

1
2 3 4 5
40