logo
down
shadow

UNIX QUESTIONS

Allow user to set up an SSH tunnel, but nothing else
Allow user to set up an SSH tunnel, but nothing else
around this issue On Ubuntu 11.10, I found I could block ssh commands, sent with and without -T, and block scp copying, while allowing port forwarding to go through. Specifically I have a redis-server on "somehost" bound to localhost:6379 that I wish
TAG : unix
Date : January 25 2021, 07:01 AM , By : Heals1ic
Date arithmetic in Unix shell scripts
Date arithmetic in Unix shell scripts
should help you out I have written a bash script for converting dates expressed in English into conventional mm/dd/yyyy dates. It is called ComputeDate.Here are some examples of its use. For brevity I have placed the output of each invocation on the
TAG : unix
Date : January 23 2021, 02:43 AM , By : Santhanam
Using Xming X Window Server over a VPN
Using Xming X Window Server over a VPN
it helps some times Chances are it's either X authentication, the X server binding to an interface, or your DISPLAY variable. I don't use Xming myself but there are some general phenomenon to check for. One test you can do to manually verify the DISP
TAG : unix
Date : January 22 2021, 04:47 PM , By : Antony Briggs
How to format a dos path to a unix path on cygwin command line
How to format a dos path to a unix path on cygwin command line
hop of those help? all. Apparently all I need are single quotes around the path: cd 'C:\windows\path'
TAG : unix
Date : January 10 2021, 01:57 PM , By : Michael Gunderson
Transpose rows to columns keeping some rows as reference in shell
Transpose rows to columns keeping some rows as reference in shell
it fixes the issue IF you only have three field, you do not need to use loop, so this should work.
TAG : unix
Date : January 02 2021, 06:48 AM , By : ussballantyne
How to use the output from sed command as a string and use that string in the grep command?
How to use the output from sed command as a string and use that string in the grep command?
help you fix your problem It seems to me that you're asking two completely different questions: one in the title and one in the body. I'll try to summarize them and answer both.First question:
TAG : unix
Date : January 02 2021, 06:48 AM , By : Brian Drum
How to extract text following a keyword in UNIX
How to extract text following a keyword in UNIX
I wish did fix the issue. I have a text file (file.txt) that contains a wall of results (no newlines, whitespaces etc) that I received from an external source. From this file, I need to find all mentions of the word serId, and then print out the alph
TAG : unix
Date : January 02 2021, 06:48 AM , By : Ian Badcoe
What's the best way to convert Windows/DOS files to Unix in batch?
What's the best way to convert Windows/DOS files to Unix in batch?
I wish did fix the issue. dos2unix
TAG : unix
Date : January 02 2021, 06:48 AM , By : Robert MacGregor
Regarding Unix shell script
Regarding Unix shell script
may help you . I want to retrieve the file from the INFILE directory which are begining with the file names prefix "BBSCGG_" or "BCT_" or "ACL_" or "ASC" and do the processing inside the for loop
TAG : unix
Date : January 02 2021, 06:48 AM , By : Govind Bhavan
What are all the differences between pipes and message queues?
What are all the differences between pipes and message queues?
will be helpful for those in need Message Queues are: UNIDIRECTIONAL Fixed number of entries Each entry has a maximum size All the queue memory ( entries * entry size) allocated at creation Datagram-like behavior: reading an entry removes it from the
TAG : unix
Date : January 02 2021, 06:48 AM , By : Shrek Qian
display records which exist in file2 but not in file1
display records which exist in file2 but not in file1
To fix the issue you can do log file1 contains records of customers(name,id,date) who visited yesterday log file2 contains records of customers(name,id,date) who visited today , an example, but check the man page of comm for the option you want.
TAG : unix
Date : January 02 2021, 06:48 AM , By : Tom Berthon
Sed Command that will check the 2nd column of my file and delete the matching data
Sed Command that will check the 2nd column of my file and delete the matching data
wish of those help I Would like to seek help, I'm a beginner using sed, , This is more a job for awk rather than sed. Try using awk like this:
TAG : unix
Date : December 27 2020, 02:42 PM , By : Pip
How to create new folder in UNIX and copy ".log" files older than a specifice Date from some location to this
How to create new folder in UNIX and copy ".log" files older than a specifice Date from some location to this
Any of those help I need to do some testing for that I want to make a temporary Directory in the Dev instance of my Unix server (Redhat Linux 6.9(64-bit)) and copy the files in that directory on which i want to perform testing. , The following script
TAG : unix
Date : December 25 2020, 03:30 PM , By : Robby
How to merge two files based on one column and print both matching and non-matching?
How to merge two files based on one column and print both matching and non-matching?
hope this fix your issue I am trying to merge two files, match them on $1,and display the match from file 2 into a new column $3. If they don't match, the value should display 0. , Assuming your real files are sorted like your samples are:
TAG : unix
Date : December 25 2020, 12:01 PM , By : tanminivan
how to read junit result on travis log by sed?
how to read junit result on travis log by sed?
like below fixes the issue I add 3 sample trace by echo. , I think this should work:
TAG : unix
Date : December 25 2020, 07:01 AM , By : user183842
Assign HDFS location of Hive external table to a Unix variable
Assign HDFS location of Hive external table to a Unix variable
fixed the issue. Will look into that further Is there a way to get hdfs location from external table and assign to unix variable. , Yes, there is a way. Run a command like the below,
TAG : unix
Date : December 25 2020, 06:47 AM , By : John Bentley
What does ps auwx | grep nginx means?
What does ps auwx | grep nginx means?
seems to work fine As with all things Linux/Unix the man pages are your friend: man ps, man grepauwx are bsd style parameters (note the lack of an -) and the manual states that these letters represent the following options:
TAG : unix
Date : December 25 2020, 06:47 AM , By : James B
Adding / superimposing two wav files
Adding / superimposing two wav files
I hope this helps you . The amix filter will rescale the volume of the inputs, so to recover volume, add a filter afterwards.ffmpeg -i wav1.wav -i wav2.wav -filter_complex amix=inputs=2:duration=first,volume=2 wav_merged.wav
TAG : unix
Date : December 22 2020, 10:01 AM , By : user91848
How can I remove digits after a tab?
How can I remove digits after a tab?
This might help you I have two columns in my file. Example: The first column has movie titles and the second column has its ratings. , You can just do
TAG : unix
Date : December 20 2020, 04:43 AM , By : picamiolo
match lines with leading 0s in date
match lines with leading 0s in date
I hope this helps . I am trying to grep strings in a file, which has filename and trying to extract that are older than 3 weeks old from the current date and i am having trouble with the leading 0s in the month or date format. , awk to the rescue
TAG : unix
Date : December 05 2020, 12:26 PM , By : jehammon
How to install apt-get package in Amazon Linux machine
How to install apt-get package in Amazon Linux machine
should help you out well figured out these commands hence answering,these commands will install apt-get and run docker as ec2 user
TAG : unix
Date : November 29 2020, 04:01 AM , By : CrookedNumber
Panic function in UNIX
Panic function in UNIX
I hope this helps you . Well this is PDP 11/40 assembly language, which is defined in the manual.Let's break it down, line by line:
TAG : unix
Date : November 26 2020, 06:23 AM , By : Munir
cron job scheduling timing for excecuting the script
cron job scheduling timing for excecuting the script
like below fixes the issue I need to execute a script through cron expression that is 5 days per week (Mon-Fri) between 6pm and 7am GMT. , as the format is as follows:
TAG : unix
Date : November 25 2020, 07:27 PM , By : Ben Brown
How replace numbers in a specific line
How replace numbers in a specific line
Hope that helps I need to replace numbers only in a specific line in a multiple files with sed (or awk).
TAG : unix
Date : November 24 2020, 05:49 AM , By : John Tate
What is the difference between find command options- -atime & -mtime?
What is the difference between find command options- -atime & -mtime?
To fix the issue you can do I cannot understand the difference between -atime -mtime options of 'find' command. The man page gives the same definition for both of them.
TAG : unix
Date : November 22 2020, 10:56 AM , By : Vodkat
File management systems - device drivers and basic file systems
File management systems - device drivers and basic file systems
fixed the issue. Will look into that further Break this down into layer:Layer 1) Physical I/O to a disk requires specifying the platter, sector and track to read or write to a block.
TAG : unix
Date : November 21 2020, 11:01 PM , By : Maplye
Unix folders - where to put intermediate files and results when running a script
Unix folders - where to put intermediate files and results when running a script
will help you /usr/local is a poor choice for your temp files as indicated by the others. You may choose to put the script under the /usr/local/bin, but do not extract or process your files under /usr/local.
TAG : unix
Date : November 19 2020, 01:01 AM , By : cthulhup
Unix find -mtime {a negative or postive value}
Unix find -mtime {a negative or postive value}
Hope that helps What do find -mtime -4 and find -mtime +4 do? I cannot understand the examples given in the man page. , As per man page:
TAG : unix
Date : November 18 2020, 03:49 PM , By : user181945
passing variables to another KSH script
passing variables to another KSH script
hop of those help? lets say I have one KSH script that creates a variable....in that KSH script I call another KSH script file and want to pass a variable from the current script to the one that it calls...how do I do that? , See following example:
TAG : unix
Date : November 15 2020, 06:54 AM , By : user133834
whats is the meaning of using exec and then read in ksh script
whats is the meaning of using exec and then read in ksh script
around this issue The exec 8< $SEQ_FILE opens the file $SEQ_FILE for reading and associates it with file descriptor 8. All further commands can then read from that file descriptor.The command read -u8 DATE SEQ_NUMBER then does exactly that. It reads
TAG : unix
Date : November 14 2020, 05:18 PM , By : tjh0001
How to set up your path so you can call 'julia' via the Terminal?
How to set up your path so you can call 'julia' via the Terminal?
seems to work fine Change to your home directory and find the file .bash_profile (note the . at the start: this is a hidden file. You can do ls -a to see if it is there, or just try to open it with an editor.)
TAG : unix
Date : November 09 2020, 08:00 AM , By : Steven Weber
Recursively find and enque latest mp3 files to audio player
Recursively find and enque latest mp3 files to audio player
it fixes the issue I often add new mp3s into a deeply nested collection of folders. While I could re-add the whole collection to my audio player audacious I like to have the most recent additions at the end of the list. , Copy latest 400 mp3 files in
TAG : unix
Date : November 07 2020, 09:00 AM , By : WuJanJai
Command that finds all lines in a file that are more than 30 characters long and split them
Command that finds all lines in a file that are more than 30 characters long and split them
Hope this helps I have to write an awk command that will find all lines in a specified file that are more than 30 characters long and split these lines into multiple lines with no more than 30 characters each. , Simple, there's an utility for that pu
TAG : unix
Date : November 07 2020, 04:01 AM , By : Vrki
What command should I use to display specific information about a directory, not its content?
What command should I use to display specific information about a directory, not its content?
Hope that helps I need to know how to display info about a directory itself. , Use this command (The -d flag will make ls display only directories):
TAG : unix
Date : November 01 2020, 03:09 PM , By : 40a
Modify permissions for scripts recursively
Modify permissions for scripts recursively
like below fixes the issue Trying to set permissions recursively for multiple scripts: , This command should do the trick:
TAG : unix
Date : October 29 2020, 04:01 PM , By : Angelo Giannatos
concatenate 2 lines in one line using unix command
concatenate 2 lines in one line using unix command
this will help I would like to concatenate 2 lines in one. Let's say I have a data like these, , paste is easiest and most efficient in this case:
TAG : unix
Date : October 23 2020, 05:39 PM , By : user180941
How to extract the name of immediate directory along with the filename?
How to extract the name of immediate directory along with the filename?
To fix the issue you can do I have a file whose complete path is like
TAG : unix
Date : October 22 2020, 11:12 PM , By : Thomas Gueze
Join lines with similar first column
Join lines with similar first column
should help you out File:
TAG : unix
Date : October 20 2020, 01:08 AM , By : jaredsmiller
How to use find exec cp with a regex pattern?
How to use find exec cp with a regex pattern?
wish helps you You can use -and or -a for multiple true condition as follows. ! for negation can be applied after and
TAG : unix
Date : October 14 2020, 09:30 AM , By : user186435
How do I remove core files in Unix?
How do I remove core files in Unix?
Hope this helps If the core file is named core, then just do rm -f core.The -f option tells rm not to complain if the file doesn't exist. (It also tells it to go ahead and remove it without a prompt even if it's not writable.)
TAG : unix
Date : October 09 2020, 03:00 AM , By : richardD
Parsing a file with multiple line and replace the each first occurrence with Pipe
Parsing a file with multiple line and replace the each first occurrence with Pipe
To fix this issue Currently we have receiving a file, which is more like a name value pair. Each of the pair data is separated by pipe delimiter and Name and value pair is separated by space. I want to replace the space with Pipe inside the pipe deli
TAG : unix
Date : October 08 2020, 10:00 PM , By : Jay Crockett
Why does argc exist/why does env NOT have simething similar?
Why does argc exist/why does env NOT have simething similar?
hop of those help? I have no special insight into the minds of early Unix designers. But for one thing, there are plenty of situations where you want to know the number of command line arguments, e.g. if (argc < 3) usage();. But I can't think of any
TAG : unix
Date : October 08 2020, 12:00 PM , By : rixtertech
Awk command to perform action on lines excluding 1st and last
Awk command to perform action on lines excluding 1st and last
will help you I have multiple MS excel files in csv format in a particular directory. I want to update the value of one particular column in all the rows of the csv files. , This may do:
TAG : unix
Date : October 07 2020, 09:00 AM , By : ziqew
AWK command to convert one of the column of text file to Camelcase String
AWK command to convert one of the column of text file to Camelcase String
I wish this helpful for you I have to convert all the column values to camelCase letters/String , This gnu awk (due to splitting by null string) may do.
TAG : unix
Date : October 07 2020, 01:00 AM , By : Mikael
Listing directories containing more than 2 files
Listing directories containing more than 2 files
it fixes the issue Using -maxdepth 1 was simply searching at the first level of the directory which is the directory itself. To search within the subdirectories, I had to use -maxdepth 2 and it solved my problem.Command used is $ find . -maxdepth 2 -
TAG : unix
Date : October 06 2020, 04:00 AM , By : Erwin
NiFi https setup giving certificate error
NiFi https setup giving certificate error
it helps some times NiFi is telling your browser that you must present a client certificate in order to authenticate to the system. This is likely because you have not configured any other authentication mechanism (LDAP, Kerberos, OpenID Connect, etc
TAG : unix
Date : October 04 2020, 04:00 AM , By : Ravenal
Count and check if number of a string repetition in a Line is more than 1
Count and check if number of a string repetition in a Line is more than 1
To fix the issue you can do I am trying to count the number of occurrence of "1260005113" and then check if it is more than 1 or not
TAG : unix
Date : October 03 2020, 09:00 AM , By : jgood
Remove folder starting with – (en dash)
Remove folder starting with – (en dash)
Hope this helps Don't know how, but I ended up with a folder named –p (en dash, not regular dash) , Try
TAG : unix
Date : September 30 2020, 02:00 AM , By : arcadian
How to display users in z/os Unix group?
How to display users in z/os Unix group?
around this issue This will depend on the security manager you have installed. Assuming RACF.Here is a link to an article explaining the process.
TAG : unix
Date : September 29 2020, 12:00 PM , By : Manu
meaning and output of date command in Unix
meaning and output of date command in Unix
I think the issue was by ths following , The date will give the current date time. With --date='{{ end }} day' you are adding end number of days to current date time.The +%s outputs the overall Unix timestamp after adding end number of days.
TAG : unix
Date : September 29 2020, 12:00 AM , By : Nate Bedortha
Loop over word and extract bigram
Loop over word and extract bigram
hop of those help? I would like to extract every single bigram from a given word and put in a text file. , I'd do it like this:
TAG : unix
Date : September 27 2020, 03:00 PM , By : ack
how to create kotlin infix function with 2 words?
how to create kotlin infix function with 2 words?
this one helps. What you are trying to achieve doesn't make much sense and you shouldn't implement such things in production. Just for educational propose, something similar can be achieved:
TAG : unix
Date : September 25 2020, 05:00 PM , By : user176691
How to install Google Cloud SDK on AIX machine
How to install Google Cloud SDK on AIX machine
hop of those help? If you are seeking a prepared package for installation on AIX, I am not aware of one.AIX does support Python. You can install Python from the AIX toolbox repository.
TAG : unix
Date : September 25 2020, 03:00 PM , By : user186012
How can I use grep to display lines that start AND end with the same word
How can I use grep to display lines that start AND end with the same word
wish help you to fix your issue If you want to match the same word, you could use (if supported) \w+ to match 1+ word characters and a back reference to the captured word.
TAG : unix
Date : September 24 2020, 10:00 PM , By : jay
Jenkins for syncing folder in separate environments
Jenkins for syncing folder in separate environments
I wish this help you Use any version control system to store code in text format.Developers will pull, do job and push changes, all in text format.
TAG : unix
Date : September 22 2020, 09:00 PM , By : Tim Tyrrell
Getting yesterday's date in Unix csh script
Getting yesterday's date in Unix csh script
fixed the issue. Will look into that further I currently have the below lines as part of my script:
TAG : unix
Date : September 17 2020, 01:00 PM , By : kuba53280
Zsh script will not set environment variables
Zsh script will not set environment variables
should help you out Your getopts string doesn't allow for option-arguments.Change it from:
TAG : unix
Date : September 03 2020, 08:00 AM , By : Gianluca Riccardi
shadow
Privacy Policy - Terms - Contact Us © scrbit.com