Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
36 views

How do I only copy a file, then manually navigate to another destination, and then paste it. (Without a fixed path)

I need to move a file from one directory to another without any fixed paths in the copy/paste command. That means I likely cannot have a one-liner copy/paste command: The folder structure is as ...
0
votes
2answers
71 views

Change SFTP user's permissions when transferring files to webserver

I created a webserver and have two users that can login over SFTP to change, edit, view, and create folders/new files. When the two users create a new file, the permissions are -rw-r--r--. I need the ...
0
votes
0answers
16 views

How can I set a unix binary as a default application in Mac OS High Sierra?

I want to configure mupdf to be my default PDF viewer in Mac OS, but it's a unix console executable located in /usr/local. The traditional "Open with" method does not work, as Finder will not allow ...
0
votes
1answer
47 views

Using `ls` to show real name of file owners

Unix users can have their real names listed in /etc/passwd/. The finger command can display the real names. Can ls -l show these real names of file owners next to the files? If ls cannot do this ...
1
vote
1answer
31 views

find matched file_ids within the dat files in the directory and copy them to a different directory

I have a file_id = 840920 and I have to pick only the child files that belong to the file_id = 840920. The names of the dat file are different but within all the dat file, the parent file id is ...
0
votes
0answers
21 views

Regular expression to find information from the log [closed]

I have an error information in the format below. I need to get these information from the log info. Date thread info Exception info request name, user , and req id within the parenthesis. Log Format:...
0
votes
2answers
42 views

Error when ssh to remote server when using sudo user

Trying to do ssh to remote machine over sudo user and getting error but doing ssh thru my normal user getting connection error. Here is the detail process. case_1 - ssh by Normal User - Working fine ...
0
votes
1answer
29 views

Usage of the percentile operator in shell scripts

In this link: https://superuser.com/a/180252/401901 The following command is used: cat list.txt | xargs -I % echo cp % new_folder What does the % % usage mean? All google search results are about ...
0
votes
1answer
18 views

The $1.gz exists in the folder, but it said cannot access, no such file or directory

I have a script that says gzip -cN "$1" > "$1.gz" | ls -l "$1.gz" | awk '{print $5}' I run it with an argument of ff, and I get the error message ls: cannot access ff.gz: No such file or ...
0
votes
1answer
33 views

Date a GNU/Linux or Unix program was first released [closed]

When I uncover a new command, most recently column, I am curious as to how long this command has existed -- in appreciation of the longevity of Unix, its dedicated developers, and my own ignorance! ...
0
votes
0answers
34 views

AIX — Korn shell script — SFTP catch and log errors

Working on AIX OS and korn shell scripting. Need to catch and log errors and send e-mail when sftp connection fails or any command fails in sftp session. How to do this? I tried to perform the ...
-3
votes
1answer
119 views

What distros are NOT affected by the new Code of Conduct? [closed]

What distros of Linux or Unix based operating systems are NOT subject to the new code of conduct recently implemented for Linux? And/or which use no code affected by this CoC? https://git.kernel.org/...
0
votes
2answers
23 views

UNIX: Using sed, how to print every 1st and 2nd lines in sets of 4 lines?

My file has multiple sets of lines. Each set has 4 lines. Line 1-4 is set 1. Line 5-8 is set 2 and so on. I need to print the first two lines from every set i.e line 1 and 2, line 5 and 6 and so on. ...
0
votes
0answers
24 views

Changing .csv file from UTF-16 to UTF-8 deletes file data

I tried changing character set of .csv file from UTF-16 to UTF-8 using the unix command iconv -f utf-16le -t UTF-8//TRANSLIT <input file> -o <output file> After running word count ...
0
votes
2answers
94 views

Loop and extract files matching a path

I am currently in a directory with many directories. $ ls the bad icons 100 the games icons 100 the beach & camping icons 100 the halloween icons 100 How can I extract ...
-2
votes
1answer
23 views

Is it possible to have stunnel listen to specific path?

I am able to configure Stunnel to listen for 'myserver:port', however I'd like to be able to have Stunnel listen for a specific path e.g. 'myserver:port/path' Does anyone happen to know if this is ...
-1
votes
1answer
25 views

SSH login Script

I am writing a script where i need to check login credentials of all servers. It should verify with password as well. I am using below logic but it fails with breaking the while loop when it success ...
0
votes
0answers
30 views

Directory has 730 permissions but file has 644 permissions - security issues?

If a UNIX parent directory is designated to have the access permissions of "730" but a file inside that directory has permissions of "644", is this a problem?
0
votes
0answers
41 views

How to see URLs with 'ps -ef | grep chrome' output?

I want to see the processes for every chrome tab along with their URLs. ps -ef | grep chrome does not seem to achieve those results. What ps options should I add?
0
votes
0answers
13 views

CUPS on RHEL: Duplicate One Printer's Config (not all of cups cfgs) to Add Identical Printers With Same Configuration

I am just looking to take the settings of one printer (intermec px4i) and clone them(only editing hostname and addr.) or make some sort of template so i can add the rest of the px4i's on our network. ...
0
votes
0answers
21 views

Restricting ssh and ftp access to unix server

I know I can restrict ssh and ftp access to my unix server by using tools like ufw (uncomplicated firewall). What if I restrict ssh and ftp access to one IP address (my home IP) and then suddenly lose ...
1
vote
1answer
42 views

Why NFS shows 100% but actual disk usage is some MB only

We have an issue with one of the NFS as its showing 94% usage as per df but actually some 10 BM only used. # df -h |grep lv-new-1401 cbjserver:/f04780/lv-new-1401 10G 9.4G 650M 94% /var/lib/...
0
votes
0answers
21 views

Identify Resource Usage of a Process: CPU, Memory and I/O

I need to request some AWS resources and in order to do so, I need to identify what are my requirements for: Number of CPU cores (maybe GPUs as well) (performs parallel processing) Amount of Memory ...
0
votes
1answer
29 views

Is there a way to display `free` updates in place without outputing new lines?

When I do free -m -s 1 it gives something like this: total used free shared buff/cache available Mem: 3789 3022 347 90 ...
0
votes
1answer
139 views

sudo su with password provided in jenkins?

I am stuck with one requirement in which I am switching to some "xxx" user and it asks for password every time. I am trying to automate this process with password hardcoded in Jenkins job. ex: sudo su ...
0
votes
3answers
55 views

chmod 1,2 and 4, what exactly do they do?

I was wondering about having only read, only write, or only execute permission, and what it means. If I have write permission only, does that mean I can append to, or replace the contents of the ...
1
vote
2answers
40 views

How to merge multi-line output to form a single line?

I want to join different line output to a single line like below. $ cat new.txt | grep Full | awk '{print $1}' 09/01/2018 08/25/2018 08/18/2018 08/11/2018 08/04/2018 07/28/2018 07/21/2018 I want ...
-3
votes
1answer
31 views

Question mark and no internet access

Suddenly, out of the blue, my internet is not working at all, I’ve tried all I found on the internet but in vain. I think is a dns problem or I don’t know. The problem occurred after I tried to switch ...
1
vote
3answers
94 views

How to get a line using a pattern before a line number?

I need to get a line which matches a pattern before a certain line number of a file. Example: linenum 1.fruits linenum 2.cherry linenum 3.apple . . linenum 7.orange linenum 8.apple2 . . . linenum 20....
0
votes
2answers
88 views

Sending terminal commands via SSH connection: Nested pipes

Hoi everybody, I am currently having a problem with sending commands over SSH via command line to a server. To have an easy example, I always send the "pwd" command - which should return the current ...
0
votes
1answer
24 views

Exclude mlocate.db from the Locate searches

Can the search be excluded in /var/lib/mlocate/mlocate.db? I just want you to look at the one I generated locally. With -d or modifying LOCATE_PATH, only the one created in local is added, but ...
1
vote
1answer
83 views

Why Unix child processes inherit [most] parent process attributes

Learning about how Unix processes work, and noticed that child processes inherit most of the attributes (including file descriptors) from the parent process. I also just learned about exec and how it ...
1
vote
1answer
27 views

Why are files lwith the same time stamp not sorted alphabetically when listed using “ls -lt”?

I read that ls -lt will order files by modification time before sorting by lexicographical order. However, when I use the command with this syntax, I get this result: ls -lt total 192 -rw-r--r-- 1 ...
0
votes
2answers
77 views

Automatize multi-hop SSH and SCP with passwords

I want to access some host from my personal computer, but I have to access an intermediate server first, because the final destination cannot be seen from public internet. The thing is that I have to ...
0
votes
1answer
115 views

Regular expression to match opening double quote missing a ending double quote

I have a large (25 million rows) data file that is pipe (|) delimited. The data vendor provides files and I run automated jobs to load the files to a Redshift database and then process the data. The ...
0
votes
0answers
53 views

Can the ouput of mailx command in unix be stored in a variable or can that output be processed to check the details of unread mails?

I am using mailx command to see the details of the unread mails etc. How can the output of the mailx command be stored in a variable to process the details of the mails further?
1
vote
1answer
119 views

SCP Error Message “Operation not supported”

I was recently stuck for too long on a rookie problem. I tried to use scp to copy over a directory of files to my local machine by executing the following command: scp -r myUserName@myhost.mydomain....
3
votes
3answers
48 views

Combine multiple lines dynamically in unix

I have below scenario: Iteration 1 - Ddd Bbb Ccc Ddd Eee Fff Ddd Iteration 2 - Ddd Bbb Ddd I want to combine the data as below - Iteration 1 output - Ddd Bbb Ccc Ddd Eee Fff Ddd Iteration 2 ...
2
votes
0answers
62 views

Update Java version, Solaris 10

I'm trying to update Java version on Solaris 10. I have downloaded a tarball jre-8u73-solaris-x64.tar.gz. Using these commands: which java /usr/bin/java gzip -dc jre-8u73-solaris-x64.tar.gz | tar xf ...
0
votes
1answer
20 views

Getting command history of all opened terminals in one place

I had been working with multiple terminal opened . For some reason my PC rebooted and after when I executed the 'history' command , I could only see the list of commands related to a particular ...
0
votes
1answer
57 views

Files that start with ' ~$ ' and end with .doc / .docx are appearing on my desktop. How can I remove them?

I was going through my desktop in Linux and I noticed a list of files that were not on my desktop. They are Microsoft word(.doc & .docx) files that exist on my computer elsewhere. For some reason ...
0
votes
1answer
35 views

SSH between N number of servers

I have n number of servers like c0001.test.cloud.com, c0002.test.cloud.com, c0003.test.cloud.com and I want to do the ssh between these servers like: from Server: c0001 do the ssh to c0002 and then ...
0
votes
1answer
35 views

Unable to locate package shred. Meaning, apt-get can't find it and neither can I using Google

I have come to depend on this unix utility to wipe SSD drives dependably and quickly in preparation for re-imaging. I am curious as to why it is gone. But the purpose of this question is to either: ...
0
votes
1answer
21 views

cannot find the file created under cygwin using the search from microsoft windows 7

I am a Windows 7 user and have a large text file (>3 GB) to process and extract information. I chose to run cygwin under Windows 7 to split the file as I do not know how to do it using DOS command ...
0
votes
1answer
78 views

see Unix userids in macOS

I have a million-file 900-userid snapshot of an old Unix file server. On Linux I can browse it and have ls -l show usernames from the snapshot's /etc/passwd, by just chroot'ing to the snapshot's top ...
2
votes
1answer
103 views

Fastest way to compress (i.e. archive into a single file) millions of small files on a powerful cluster to speed up transfer of files

IMPORTANT NOTE: Compression is NOT the goal, archiving/taping (packing all of the files into a single archive) is the goal. I want to backup a single directory, which contains hundreds of sub-...
1
vote
1answer
41 views

Unix/Linux - service unit file cannot recognize env variable set in /etc/environment

I have an environment variable setup correctly in /etc/environment I have ensured that it loads correctly via /etc/profile modification. and I can echo it to confirm. but when I created the unit ...
1
vote
1answer
134 views

Concatenate and loop MP3 files

I want to concatenate and loop 3 MP3 files. grammaraudio1.mp3 grammaraudio2.mp3 grammarsudio3.mp3 The output file must loop the first MP3 file five times, then the second one 5 times, etc. Can I ...
0
votes
0answers
42 views

How to detect a USB drive in Lynx OS?

In Linux, when I insert a USB stick, the USB shows up in /dev, usually as /dev/sdb or something similar. Right now I am trying to backup a computer running Lynx OS, when I insert a USB stick, nothing ...
-4
votes
1answer
197 views

How do I determine what is the best block size for a 960 PRO M.2?

I have a Samsung NVMe SSD 960 PRO M.2. I was in the process of installing Gentoo on it. gparted notified me that the physical block size, is different than what the kernel reports. I thought the ...