Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

All Questions

Tagged with
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
1answer
14 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
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 ...
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 ...
1
vote
1answer
74 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
57 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
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 ...
1
vote
1answer
159 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:directorysubdirectory 1subdirectory 2project 1htmldirectory 1 ...
0
votes
2answers
110 views

Delete dot file only if non-dot file exists in *nix

I'm moving files from a FAT32 filesystem into an EXFAT filesystem on a Mac. My understanding is that FAT32 doesn't support extended file attributes so it created dot files for each file.However now ...
1
vote
1answer
73 views

`line` command on unix/linux bash prompt a permission denied infor

Recently, I am learning how to write script code. I wrote a script:#!/bin/sh# while3b.shwhile f=`line`do.. process f ..done < http://superuser.com/myfileand here is myfilehellohowdygdaybonjour...
0
votes
0answers
40 views

Finding the parent process name which makes zombies

I use terminal in Unix and I try to find and print on the screen the parent process name of a zombie process. I use the instruction:ps rf -opid,cmd -C <process-name> awk ' { print $1 }' ...
3
votes
3answers
161 views

How to pipe a single item from a command output into another command?

Basic example using grep (note that grep would not be my only use-case for this):$ grep -Irl "foo"path/to/directory/help.jspath/to/directory/config.jspath/to/directory/task.jsNow I want to open ...
21
votes
2answers
2k views

What is the function of the asterisk as a standalone command in Unix?

I was messing around in terminal on Red Hat Linux, and when I typed the asterisk (*) followed by return, and it executed one of the programs in my directory. Why?My best guess is that Unix treated ...
-1
votes
1answer
41 views

Dealing with Ctrl+Z in Unix

While completing an assignment on Unix, I accidentally pressed Ctrl+Z and the program got terminated (suspended). Afterwards when I try to access it again, I am getting the message 'permission denied'....

153050per page