Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

0
votes
1answer
13 views

Pattern search the user input in a file in Unix using awk

I am trying to write awk script to search for a pattern that is given input by user, in a file. My code look like this: awk 'BEGIN{printf "Enter : ";getline input<"/dev/tty"} /'"$input"'/ {print}' ...
-1
votes
2answers
23 views

gzip unix command with tar command

I want to zip more than one file using gzip, but when I unzip it I should get multiple files. I tried tar with zip but tar created extra folders that I don't want. The files I want to zip are ...
1
vote
1answer
33 views

Terminal: How to list current directory while typing out a path

I'm not sure how to phrase this correctly but I want to know how in the terminal to do the equivalent of 'ls' when typing out a path. So for example i'm typing in: sudo "/Library/Application\ ...
1
vote
1answer
36 views

I just installed GMP, where did it install to?

I am not familiar with installing programs with ./configure...make and so forth. I just installed GMP like this and now I cannot seem to find where it installed to. I checked in all the bins I could ...
0
votes
1answer
25 views

At is scheduling the job but not executing the commands under it

Please help me solve my issue on at command. I am giving the below command and it is not executing. # at now at> ls -l > txt.txt at> <EOT> job 1 at 2016-04-27 11:31 when I try to ...
1
vote
1answer
17 views

How to pass array to bash shell script?

How do I pass an array as a variable from a first bash shell script to a second script. first.sh #!/bin/bash AR=('foo' 'bar' 'baz' 'bat') sh second.sh "$AR" # foo sh second.sh "${AR[@]}" # foo ...
0
votes
2answers
23 views

How to add sizes of all files with the same name in UNIX Shell scripts

I'm new here and I want to ask how to add sizes of files with the same name? My file names are actually different from each other but I cut them so I could get files that are grouped together. here ...
-2
votes
1answer
36 views

Is it posible to use a hardware in another computer over the internet? [closed]

In virtual machines, you can pass a graphics card to the virtual machine and the host will not be able to use it like normal. I would like to know if it's possible for two computers on a network or ...
0
votes
0answers
27 views

Shell script - Unable to copy file from one older to another

I need to copy the files from one folder to another, here source and destination information are in the text file. File content: resconfig.txt cp -f /var/lib/jenkins/jobs/Android\ Gradle\ test\ ...
0
votes
1answer
19 views

Shell Save the array element values in the variables

I need to copy the files from one folder to another, here source and destination information are in the text file. File content: res.txt /var/lib/jenkins/jobs/Android\ Gradle\ test\ ...
0
votes
0answers
18 views

Where can I get Unicast, Multicast, Broadcast and Discard Packets Sent and Received via a particular interface in Unix systems?

I have created several interfaces on my Unix machine for communication to the external world. Now I need to get the count of various packets Sent and Received via each interface. I have already ...
0
votes
1answer
20 views

Shell how to use a command to every regular file in and below the Dir

So what I have to do is find all regular files within and below the directory. For each of these regular files, I have to egrep for pattern($ARG) and find out if the output of the file matches the ...
0
votes
1answer
10 views

Test for XML declaration and add if it's missing

I have a program which expects input XML files having an XML declaration of the form <?xml version="1.0" encoding="UTF-8"?> (all our files are UTF-8, it really has to be that string). Some of ...
0
votes
0answers
8 views

Tool to connect to a file descriptor for I/O

I'm looking for a unix tool which can connect me to a specific file descriptor and do some I/O operations on it, assuming that the user permissions are valid. What could I look to use?
-1
votes
1answer
34 views

Port Number used by ping process

Ping Output: $ ping 192.168.20.36 PING 192.168.20.36 (192.168.20.36) 56(84) bytes of data. 64 bytes from 192.168.20.36: icmp_req=1 ttl=64 time=0.165 ms 64 bytes from 192.168.20.36: icmp_req=2 ttl=64 ...
1
vote
1answer
21 views

Bash: Is it possible to declare each list item on a new line?

Example: You normally list values in a horizontal layout for var in 0 1 2 3 4 5 6 7 8 9 do echo $var done It would be nice for version control and readability purposes to enter each list item on ...
0
votes
1answer
26 views

What is the difference between a service and an application?

In UNIX , what is the difference between a service and an application program technically?
2
votes
1answer
14 views

Unable to understand error with unzip

I have some *.zip files. I was trying to unzip these files through unzip command in Unix. But it is giving some trouble which I can not understand. Here is what I am trying to do unzip file.zip It ...
-1
votes
1answer
16 views

How can I filter unique lines based on a substring?

If I have a set of URLs in a file like: http://example.com/do?foo=bar&etc=123 http://example.com/do?etc=456&foo=bar I want to filter this out so that there's only one url for each unique ...
0
votes
1answer
23 views

How do I insert the results of a unix command into the tcsh CLI?

I often find myself wanting to create datestamped files and folders. For example, I'd love to be able to create a folder with a yymmdd datestamp called "160408-projectA" by typing: mkdir ...
1
vote
1answer
17 views

Quicken resource fork issue? Identical files behaving differently (one works, one doesn't)

My hard drive recently crashed, and my last Time Machine backup was in November. Fortunately, I was able to get all the data successfully recovered, however, I'm having a serious issue opening my ...
0
votes
0answers
9 views

Need to delete a large batch of broken links--foreach fails on spaces

I deleted a directory at some time that has a bunch of links elsewhere pointing to its contents. I wanted to use a unix foreach to delete the now dead links from the directory without dinging other ...
0
votes
1answer
28 views

Find the largest file in a Synology NAS drive

I'm trying to find out in a Linux terminal on my Synology NAS drive, how to see how much space is taken up by directories labeled as eadir. For those not familiar, these are basically metadata files ...
-4
votes
0answers
37 views

Permissions for Storage and Vendor folders in Laravel 5

duper-users ;) I'm just getting acquainted with Laravel, and would like to know what would be the best way to give the web server permission to the storage and vendor directories (as per the ...
1
vote
1answer
19 views

Write file from remote server to local directory?

I want to do some grep-magic to a logfile on a remote server and write the result to a local file on my computer. Is there an easier way than my 3 step solution: do grep-magic and write file on ...
1
vote
1answer
14 views

Trying to get pip onto UnixWare

I have an installation of UnixWare 7.1.4 for which I'd like to add (python's) pip. I know that get-pip.py is at https://bootstrap.pypa.io/get-pip.py My problem is that the only tools I have to get ...
0
votes
3answers
23 views

Delete lines that are not n consecutive lines starting with the same id

I have a file that looks like this: 194104,41.8,38.3 194104,46.7,39.6 194104,47.4,39.7 194104,49.8,44.3 194104,50.8,47.5 194136,39.9,36.3 194136,45.2,37.8 194170,46.9,42.2 ... I want to keep the ...
1
vote
1answer
22 views

Find only unique named files recursively

I'm having a problem finding only unique named files over directories and subdirectories. Files must be unique by their name, not md5 sum or content. I've managed to get list of unique files, but ...
0
votes
1answer
22 views

how do I sort the output of 'locate' by file modification time

When I use the locate command, I often wish that the output was sorted in reverse chronological order, just like with ls -rtc. What is the easiest way to achieve this?
0
votes
1answer
43 views

Simple ARP poisoning attack with UNIX?

I would like to know how to do a simple ARP poison attack with UNIX commands only (no ettercap or arpspoof or anything like that.) I don't care about forwarding packets to the actual router, I just ...
0
votes
1answer
23 views

Trying to install coreutils via MacPorts: “Error: Port coreutils not found”

I'm trying to use MacPorts to install coreutils. I check that MacPorts was installed correctly, $ port version Version: 2.3.4 and try to install coreutils, $ sudo port install coreutils Error: ...
0
votes
0answers
8 views

How can i search logs for specific timeline and copy them to local machine in windows?

Hi i am trying to find logs between 10am to 11am and i need to copy whole log file to local machine. i searched on google but not got exact syntax. steps: 1. getting logs from 10am to 11am 2. copying ...
-1
votes
1answer
16 views

Filtering out certain strings from standard input

I need a Unix command that will take piped input, filter out certain strings and write the rest to standard output. The catch is that it needs to be a one-line command that doesn't depend on anything ...
2
votes
1answer
60 views

Why did my root change to -bash-4.1?

My root@servername automatically changed to -bash-4.1@servername in one of the servers. I have the same .bashrc on both servers. Also when I do echo $PS1 I get the following, and it's the same on ...
0
votes
1answer
37 views

Is there any way to run a .jar file directly from a java Unix executable?

I have a .jar file and would like to open it using a Unix executable, java, that I have embedded within another application.(I do not have Java installed for security reasons) Is there any way to run ...
0
votes
1answer
9 views

Long running process / write stdout to files / split at X GB chunks

I have a long running process and I expect the log files to run into multiple hundreds of GBs. The program is a pre-compiled binary - so I can't modify the logic in the code. Is there a command like ...
0
votes
0answers
24 views

Shell script using diff to compare the different files

I have five different files and all are in different directory, I want to check matching files and find out the unique files as well. I am not sure how should I handle this.
0
votes
0answers
13 views

why upgrade and dist-upgrade in scripts?

I see quite a lot scripts where there is apt-get update && apt-get upgrade && apt-get dist-upgrade I thought upgrade is included in dist-upgrade, why do they keep doing this?
2
votes
1answer
49 views

Merge only new entries from one xml file to another

I have 2 xml files. The 2nd file has some new entries including same entries as that of the 1st file. Examples of the 2 files are given below. File 1 <SERVERNAME_ONE> ...
0
votes
2answers
16 views

KShell script skips commands when scheduled in cron

I have a Kshell script which executes a java program. /path/to/java -jar jarfile.jar some parameters > log Same line 5 times with different parameters appending output to log file. cat log | mail ...
6
votes
2answers
52 views

What is the difference between ~. (tilde dot) and “exit” when exitting an SSH connection

Whenever I have a backgrounded X11 connection in an SSH session, I must use ~. and not exit to exit the ssh session. What is the difference here? Can I always use the escape sequence ~. ?
0
votes
1answer
49 views

arithmetic operation on a nested column in a tab delimited file

I have a tab-delimited text file containing Column1...Columnn columns and R1 to Rn rows. Within some of the columns, there are multiple nested fields with an identifier and then separated by semicolon ...
0
votes
1answer
17 views

How to enable ssh key authentication for root users?

I want root user to be able to login via ssh key authentication. How can I get that done? I tried changing the ssh config file and adding PermitRootLogin without-password but that didn't work. I also ...
0
votes
2answers
56 views

simple arithmetic operations on a tab-delimited text file in shell script

I have a tab-delimited text file containing C1...Cn columns and R1 to Rn rows. Column 10 (C10) has a field 'X'=four comma separated integer values (X=a,b,c,d). I would like do a small arithmetic ...
1
vote
2answers
33 views

Clubbing two files after every 12 lines in hp-ux system

I have two large files .one file contains 0-12 Hrs of data and other contain 13-23 hours of data . I want to merge it in a single file with 23-0 hours for each combination. ex : file1 abcdefg00 ...
0
votes
0answers
6 views

How to edit NIS group file

I run the ypcat group command, but I want to edit this group file. Please let me know how? I don't want to edit my local /etc/group file.
0
votes
1answer
21 views

Piping stdout from a command to stdin of two commands in sh

tee [using >()] command is not working because it is not supported in sh (bourne shell). What I am trying to achieve is sending the output of "ifconfig -a" to two different commands. This is my ...
0
votes
0answers
10 views

Convert list of Hardened Linux From Scratch packages into suitable format for md5sum -c

I'd like to create a file suitable for using with md5sum -c from this document: http://www.linuxfromscratch.org/hlfs/view/development/chapter03/packages.html I imagine this should be possible by ...
0
votes
0answers
68 views

Using wine for window printer driver on Linux

We have some old printers with Windows drivers only at my work space. Is there any general way to use their drivers through wine? I have not found any decent and new documentation about the problem. ...
3
votes
1answer
45 views

How to add a signature in UNIX mail command

How do I add a signature in a mail that is sent through mail command of UNIX ? I tried it by saving text in .signature and in .sig files but that didn't work for me. Any help would be greatly ...