This command works fine in Local linux I would like to decompress a file with extension .csv.gz to HDFS location. I tried the below command and i get this error Could someone help me to fix this? Answer To make gzip write the output on standard output, use -c flag. So the command would be,
Tag: linux
Append input URL from user to variable in file using shell script
I have one file test.txt it have already some data named export website_URL and export username= test.txt start.sh here creating new file from test.txt writing data in to data.txt file here if I put input to website_URL=”http://stackoverflow.com/questions/6543841/php-cli-getting-input-from-user-and-then…
Can’t install aiohttp==2.0.6 on Alpine Linux v3.5
I’m using a fresh install of Alpine Linux v3.5 with edge/main repos These are the commands I’m running: And that’s the error that I’m getting from the last command: On the ArchLinux host, however, everything installs correctly Answer I’ve been having the same problem. I removed i…
PuTTY: Linux window – How to update the window title during a function?
I’m accessing a Linux machine from a Windows 10 PC via PuTTY. I’ve set the PuTTY (Bash) window title to ‘$PWD’ by setting $PS1 as below: This works well – whenever I change the directory in the shell, the title updates straight away: However, if I change directory in a function (as below) the title doesn’t up…
How to log to file inside brackground “watch” command?
I trying to set a watch task running in background and printing to a log file, but when i use the command in background, the files is not written. This is the command that i’m using: then the terminal prints: i try to kill the process: so i want to see the log: But the file is empty ☹️. What
Trouble passing static string as REGEXP with csplit
I’m on a Linux terminal and struggling to split a large text file into several smaller files. I’m trying with csplit, but csplit demands that the delimiter pattern is passed as a REGEXP. The static delimiter pattern is , lorum ipsum. How do I write that as a REGEXP? After reading a bit, I would ex…
How to store log files of a shell script in HDFS
I have shell script in HDFS. I want to collect the logs for this script in HDFS only. The contents of the script are below: The logs are not appending to the files. only the files are being created. How can I get the files to have the result of the function to be appended in HDFS Answer The logs
Complex rsync filtering (includes and excludes)
I got directories and files that look like this I only want to copy the 20170409_*/schedule, 20170410_*/schedule, 20170411_*/schedule folders and contents. This mostly works: However this also copies the following: How do I omit the files and the dateTimeFolders I haven’t included and only get the dateT…
emailing diff output between two files only if there is a difference
How can I email the output between file1 and file2 but only if there is a difference? Lets say I’m using a shell script. Answer Use the || concatenation. More info here
AWS Root Volume not booting
I went through some steps of adding a second partition on the Root volume. This is because the EBS is 50GB and the first partition only had 8GB allocated. So here are my steps I did: 1.) Detach Volume and attach it as a secondary to another instance. 2.) Use gdisk to create the second partition: 3.) Change FS…