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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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
1answer
26 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
30 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
27 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
32 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
44 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
19 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
13 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
56 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
34 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 ...
-1
votes
0answers
21 views

SSH Between N number of Servers using script [duplicate]

I have n number of servers like c0001, c0002, c0003 and I want to do the ssh between these servers like: from server c0001 do the ssh to c0002 and then exit the server. Come back to c0001 do the ssh ...
0
votes
1answer
29 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
18 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
70 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
31 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
119 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
39 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
112 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 ...
0
votes
2answers
186 views

Unlimited recursive while displaying time for every directory

I want to display all directories in my current directory recursively, but I also want to display the full date and time (even after 6 months). Considering I am using a Mac I had to use the FreeBSD ...
0
votes
1answer
35 views

Multiple expressions in the command-line utility `rename`

I am learning how to use the command-line Unix utility rename (see, for example, https://www.tecmint.com/rename-multiple-files-in-linux/). The manual for rename says that you can combine multiple ...
0
votes
1answer
53 views

Unexpected behavior with -h flag passed to du

As long as I've been living in *nix world I've lived under the assumption that when a command accepted a -h flag the only thing I was changing was effectively formatting of a print statement. I don't ...
3
votes
1answer
28 views

Filename generation from variable in zsh without spawning subshell

In zsh I have a glob pattern in a variable, and I want to define another variable that performs filename generation on that pattern. Is there a way to do this without spawning a subshell? The ...
0
votes
2answers
83 views

How to perform system migration to a smaller drive using the unix/linux tool dd?

I am trying to migrate a windows 10 from a 1TB HDD to a 256GB SSD, and I want to use the easiest free way with dd (the Linux/UNIX clone tool) I do have the source drive partitions shrunk such that ...
0
votes
0answers
86 views

Operation timed out when attempting ssh host computer

Cant ssh into host apple computer & cant ping I can screen share host via ARD I can ssh other computers from my remote computer I can copy files to host via ARD ssh computer's from host host ...
0
votes
1answer
68 views

How can I turn my CentOS laptop into a wireless signal repeater?

So, I have a laptop with CentOS 6.9 (i686 arch), I need to receive the internet signal through the wi-fi adapter and repeat it to the ethernet cable, how can I do this? Is there any way to do it?
0
votes
1answer
57 views

How can I copy(or move) and rename multiple files from different directories using the unix cp command?

Let's say, under this directory: /home/data/ There are 100 folders, the name of these folders are 24538_7#1, 24538_7#2, 24538_7#3 ... to 24538_7#384. In each folder, there are many files and ...
0
votes
0answers
21 views

UNIX Print contents of file into Email Body when sending mail with maix

I have one file containing some 5 to 6 lines, and i want to show the file contents into email. When i tried, I am getting the contents in the email body, However NEWLINE characters are shown as space ...
0
votes
1answer
38 views

Bash: Copy a list of files that contain (lots of) special characters

I'm well aware of how to simply copy a list of files to another location using bash, but the problem is that my list of files contains filenames that contain just about EVERY character that needs to ...
2
votes
1answer
56 views

How to separately sort lines within multiple “chunks” separated with headers?

This question is complementary to this one: Sort packs of lines alphabetically. After answering there, it turned out I had totally misunderstood the question and solved another problem. Not wanting my ...
1
vote
1answer
73 views

Appending new lines to multiple files

I'm trying to append new lines to multiple files with the following command: find -name *.ovpn -exec sh echo "line to append" >> {} \; before doing this, I ran a different command to make sure ...
0
votes
1answer
76 views

tpm-emulator-master.tar.gz: Cannot open: No such file or directory?

Can't figure out the problem as im a newbie to linux: ubuntu@ubuntu:~/Desktop$ tar -xvzf tpm-emulator-master.X.Y.tar.gz tar (child): tpm-emulator-master.X.Y.tar.gz: Cannot open: No such file or ...
0
votes
0answers
32 views

Ntalk/talk on mac os high sierra 10.13.4 (17E202) not starting up

I am trying to use talk on mac os high sierra 10.13.4 (17E202). It is disabled by default, but even after running sudo launchctl load -w /System/Library/LaunchDaemons/ntalk.plist The talk utility ...
0
votes
1answer
39 views

using logical AND within IF statement to search for file ext(tilde ~)

Please find the below script : #!/bin/bash for index in `ls -1 /appdata/frozen_files` do for bucket in `find /appdata/frozen_files/$index -name "*.gpg~" | cut -d/ -f4-5` do for files in `ls /...
0
votes
1answer
43 views

How to detect orphaned Unix socket files?

I have created a reverse SSH tunnel that creates a UNIX socket on a distant server (let's call it proxy_srv), so that I can connect the tunnel owner (named target_srv in the rest of this question) in ...
1
vote
1answer
85 views

How can I integrate WinSCP with BeyondTrust PowerBroker Password Safe?

I am able to launch WinSCP application and able to pass the hostname as its parameters but failing to do the same for Username and Password. Below are the parameters which I have supplied. -S %h -U %...
0
votes
1answer
25 views

Is it possible to create a file that gets its contents from a program?

In Linux, is it possible to make a file that upon being read from, gets its contents from an executable program? Specifically, say I have program date. Is it possible to get the output of that ...
1
vote
1answer
63 views

'ls' output timestamps different for files in /tmp versus in home directory

I'm ssh'd into my university Linux servers (RHEL 7). Here's the deal. It has to do with 'ls' and "old" files. Home directory: $ touch -d '1918-11-11 11:00 GMT' wwi-armistice $ touch now $ sleep 1 $ ...
0
votes
0answers
43 views

Linux/Windows file system interoperability

My goal is to have my development environment in docker containers. As workstation I'm using Windows but I have "ok" experience with Linux. Since many development tools are much better supported on ...
0
votes
0answers
32 views

preserve access permission when copying from network share osx

I'm trying to make a script that copies files/folder from a network shared folder( in ActiveDirectory) to a high seirra 10.13.3 in shared folder on network, I have a folder called folder1 and script ...
1
vote
1answer
29 views

How do I mercurial clone from stdin

The mercurial bundle I want to clone from is compressed in 7zip format and I don't want to waste time extracting the gigantic bundle to a temporary file. How do I pass the output of 7za to hg to clone?...
0
votes
0answers
26 views

How do I log the execution of programs within a directory regardless of shell?

I'm curious when exactly a particular directory is being used and when it is loaded into memory. Is there a way to place a low level hook in the linux file system that says when a file with execution ...
0
votes
1answer
16 views

ending txt contents in csv file by placing values in column format

I would like to get help on sending below txt contents in csv file by placing values in column format DEV-C axpp4-pkrisbtm 04-25-2018-01.15 04-25-2018-01.20 UAT AXKIN-PBBCT4 04-25-2018-22.02 04-25-...
0
votes
0answers
30 views

Using two screens with Xmanager

I am using Xmanager Enterprise 3 to access server with Linux. My computer has two screens. When I open an image from server through Xmanager, the image is good in one screen. However, when I drag it ...
1
vote
2answers
47 views

Ascending numbers every x lines and batch modifying timestamps for .srt file

I've been struggling with converting a file in the following format 0:01:00.340 --> 0:01:01.380 ***subtitle text*** 0:01:01.380 --> 0:01:02.390 ***subtitle text*** into standard .srt format, ...
0
votes
1answer
56 views

Extract tar.gz files into a directory with different basename based on their match in the text file

I have hundred of folders, some with with tar.gz files and some with bam files. I just wanted to extract tar.gz files into a different directory. Folders with tar.gz files looks like mentioned below: ...
0
votes
1answer
166 views

Wrong Python version returned, with correct $PATH set in ZSH

something very wrong is happening with my environment set up. As I am trying to learn, I decided to reinstall Mac OSX El Capitan on my Macbook Pro and start installing and configuring stuff from ...
0
votes
1answer
83 views

Standard Unix/Linux utility for testing every input line

I am writing a Bash script which should test if every line in input meet certain condition. Is there a way to take the predicate and reduce all the line to either 0 or 1 so I don't have to code the ...
0
votes
1answer
496 views

nfsd: last server has exited, flushing export cache

Brief Summary on the issue: NFS share on a CentOS6.9 system properly mounts and displays the directory when mounted on a Windows or Linux system but has trouble displaying the directory when mounted ...
0
votes
1answer
33 views

Inconsistent output of `du` command

Why is the output of du -sch ./ not identical to du -sch ./* E.g. I ran du -sch in my user's home directory and got 51GB but running du -sch * in the same directory results in 47GB. At first I ...
1
vote
1answer
154 views

Zip recursive with excluding some directories

I would like to zip the directory but exclude some subdirectories. Let's say I have such structure: directory subdirectory 1 subdirectory 2 project 1 html directory 1 ...