General :: Filtering UDS From Output Of Netstat Without Grep?

Aug 24, 2010

how I cat to filter out information about Unix Domain Sockets from netstat output without grep? Is there some option for command (I not found it in man of netstat).

View 2 Replies


ADVERTISEMENT

General :: Grep - Filtering Output By OR Condition

Aug 13, 2010

Is there some way to filter output of command by OR condition in Linux? There is filtering by AND condition with grep in way like:
ls -l | grep "^a" | grep "z$"

That says: list all files that beggins with "a" AND ends with "z" (so there is shorter way to write this: grep "^a.*z$", but it is not matter). Is there some way to perform test by OR condition? For example: files that starts exactly with "xen" OR files that ends exactly with ".rpm". But exactly, not something like:
grep "[xen]{0,3}.*[.rpm]{0,4}"

View 2 Replies View Related

General :: Filtering Out Duplicate Lines From A Find/grep Output

Mar 22, 2010

I have some big files of logs that contain errors printed by an app. They are most of the time relevant, however most of them are similar. So i figured i could check what happened between a time interval with a find.

Im using this one

Code:

And I get an output similar to this one.

Code:

Is there a way to condensate the output lines to get only one or two, indicating the start and last occurrence of a block? Or I need to create a program to do so?

Because right now I get thousands of similar lines, but when I'm scrolling through them i sometimes miss relevant information that i would've otherwise noted if it wasn't all that spammy.

View 10 Replies View Related

Security :: Netstat Output Has No Address?

Apr 19, 2011

I've never seen the type of output from netstat and don't have a clue what it means.Quote:

tcp 0 0 :::8009 :::* LISTEN 31673/java
tcp 0 0 :::22 :::* LISTEN

[code]...

View 7 Replies View Related

General :: Grep - Output Show Only Right Of?

May 17, 2010

I forgot a lot of my command line. I am doing cat file | grep "error" and i would like it to show everything to the right of G:/ including G:/ if possible. I figure its an awk command but i dont know what. I tried awk '{print $8+}' but + does not work like i hoped and guessed.

View 2 Replies View Related

General :: Grep IPs From Ifconfig Output?

Mar 6, 2011

Following is my ifconfig output code...

I want to do some thing grep that I see the IP corresponding to each LAN card?
Is that possible?

View 8 Replies View Related

General :: Exec Command With Grep Output?

Feb 15, 2011

I have a requirement to find the files having its name as ack_reply. However, there are many other files in the same directory as these resides. Now I have to remove these files from the folder and retain others after 7 days. So I tried to write the below script with grep command.

find $directory -type f -mtime +7 | grep ack_reply

how can I pass this output to -exec command.

If I am not using grep command my script would be as

find $directory -type f -mtime +7 -exec remove.sh {}\;;

How can I use -exec with grep and find.

View 4 Replies View Related

General :: Grepping Grep Output Fails

Feb 5, 2010

I'm trying to grep the output of ngrep. Unfortunately when I add another grep to the pipeline, I get no output at all. It can be some other command too - cat / grep / tee - everything breaks the chain. Example:

[Code]....

If I use cat somefile instead of ngrep at the start, everything works as expected.

View 2 Replies View Related

General :: Filter Out Unique Results From Grep Output?

Feb 21, 2010

In linux, I can grep a string from a file using grep mySearchString myFile.txt.
How can I only get the result which are unique?

View 1 Replies View Related

General :: Can't Save Grep Output Into Variable / Solution For This?

Feb 3, 2010

I would like to grep two numbers out of a text file, and divide them.

Here is the script code...

It feels like grep saves a new line too? or what is happening? i simply can't divide them, as it handles the variables as they are empty (and prints the two numbers although they were not printed

View 6 Replies View Related

Programming :: How To Get Grep Output 0 - 1 And Test It

Apr 7, 2009

I am trying to use a shell script to find a string in a file and do something when found. code...

What should happen is pppd will start in a different process and stream it's output to pppdout. pppdout should be created in the current folder. Then the script should periodically check the pppdout file for the string Script (which eventually will appear, some seconds later) and when found exit the script. Ultimately the script will do something useful when the text is found. However, the output from the program is a repeating: 'scriptname.sh: 12: FOUND: not found'

Where scriptname.sh would be the name of your script and 12 refers to the line with 'done'.

Why does grep not find the text, or at least why deos my script not check the grep output correctly?

View 10 Replies View Related

Programming :: Remove Characters From Grep Output?

Apr 14, 2010

How can I remove characters from grep output using sed? code...

View 9 Replies View Related

Ubuntu :: Output Of Command In Less And The Words Highlighted By Grep?

Sep 1, 2010

So theres this command

Code:
man -k mail
Which lists commands that contain the keyword "mail" in their description.I want the output of this command in less and the words highlighted by grep. Something like

Code:
man -k mail | grep mail | less
The command doesn't work, how do I fix it?

View 2 Replies View Related

Ubuntu :: Piping Command Output Into Grep As Search Term?

Nov 11, 2010

I want to pipe the output of a command into grep as the search TERM, rather than the text to be searched, like this for example

Code:

cat /var/log/auth.log | grep date "&b &d"

so that I only see the lines in auth.log for the current day...but obviously that line doesn't work.... is there a way to do this with grep, or even another command?

View 4 Replies View Related

Ubuntu Servers :: Using TShark And Grep - Output Empty File?

Jul 13, 2011

I am not sure why this does not work..
tshark |grep 'string'
Gives me what I want but
tshark |grep 'string' >/tmp/outputfile
Gives me an empty file.

View 3 Replies View Related

Programming :: Storing Grep Output To Feed Awk To Retrieve Entire Records Matching Variable

Jul 28, 2010

I have two files :

FileA
prot1
prot5
prot9
prot15

[Code]....

What I need to do is to extract from fileB the fields containing only the strings in fileA.

I thought awk could do the job easily with :

Code:
awk 'BEGIN { RS = "###" } /'$variable'/' fileB > output

where variable would maybe be the output of grep from fileA. So can I store the output of grep in a variable to use it afterwards with awk ?

something like that:

Code:
result=`grep prot. fileA` ; awk 'BEGIN { RS = "###" } /'$result'/' fileB > output
but that doesn't work. I'm always getting the entire fileB.

The output of grep get stored in the variable, I verified that with echo. So there is something that I just don't get... It seems to me that the above line should work.

View 11 Replies View Related

General :: Where Does Netstat Get The Process Name

Jun 25, 2011

I am developing a node application and there is an option to set the process title (process name). This only sets it in some tools (like ps and top), but not in htop or netstat.

I found this article that explained how most applications do it, but it doesn't change in netstat.

That lead me to wonder where those programs are getting the process name. Would they be getting it from /proc/##/cmdline? (## being the PID of the process)

I figure messing with things in /proc is a bad idea (and probably not possible), so if this is where those programs are getting it, is there a way to change it?

View 1 Replies View Related

General :: Function Of Netstat -a Terminal Command?

Jan 26, 2011

I had a dream least night in which I was on my computer and I was typing the command Netstat -a in command prompt in Ms-Dos. And I was wondering why it looks so much like a Linux terminal command? This question persisted in my mind after I woke up. So what is the story about it?

View 3 Replies View Related

General :: (Netstat -a Command) Why Some Sockets Do Not Have Path Name

Oct 15, 2010

When I run "netstat -a" commnand, it display:

Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 20269 /tmp/.gdm_socket
...
unix 2 [ ] DGRAM 997161
unix 3 [ ] STREAM CONNECTED 942628 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 942627
unix 3 [ ] STREAM CONNECTED 942626 /tmp/.X11-unix/X0 ....

Why some socket don't have Path name? And what mean's RefCnt = 2?

View 2 Replies View Related

Programming :: Variable String File Base - Output File Doest Not Exclude The Values In Grep -av

May 1, 2011

My script.

This is may script:

Code:

Problem: Output file doest not exclude the values in grep -av

View 3 Replies View Related

General :: Netstat Command To See If Apache Hit The MaxClient Setting?

Jun 15, 2011

Whats the proper netstat command to see if Apache hit the MaxClient setting?

View 1 Replies View Related

General :: Filtering Daemons List?

Feb 10, 2011

How do i filter the daemoms list for just 1 letter and then turn off certain run levels for that daemon?

View 2 Replies View Related

General :: Netstat Command - Active Internet Connections / Domain Sockets?

Oct 12, 2010

When I typed netstat -lna, the output:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:580 0.0.0.0:* LISTEN
...
...

Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
unix 2 [ ACC ] STREAM LISTENING 23581
...
...

Can anyone explain to me:
1. What is "Active Internet connections" & "Active UNIX domain sockets"?
2. What is unix Proto?
3. Difference between LISTEN and LISTENING state.

View 8 Replies View Related

General :: Tcpdump Filtering Remote Interface?

Jan 28, 2011

I'm trying to capture traffic between two machines, A and B. I would like to make sure that the traffic I capture with tcpdump is between eth1 on the local machine and eth0 on the remote machine. As I understand it, the -i flag specifies the local machine interface - but how to set the remote one?

View 3 Replies View Related

General :: Inexpensive Web Content Filtering Options For Home Use?

Feb 18, 2011

I've been using an old Fortigate-60 at home for the kids for some time but now the license is expired again. Are there any free or inexpensive alternatives? I'd like something I can run on a linux firewall and share against multiple users, with different profiles. In the past I ran squid and I whitelisted sites each kid was allowed to use but this becomes tedious as the kids get older and need access to more. I'd love something that could check a website rating or category list, let the user through for certain categories, and block bad or unrated sites. I don't really need virus checking or email scanning or the like.

View 1 Replies View Related

General :: Software Rec - Firewall With Application-level Filtering?

May 20, 2011

Are there any firewalls for Linux that will allow one to block certain ports for a specific application while allowing other programs to use the same port, or block Internet access altogether for specific applications?

Everything based on IPTables apparently can only block ports globally for all applications. SELinux is the only thing I've found so far that might have application-level Internet blocking capability, but it serves a broader array of security purposes and seems too complex for this task.

I don't need interactive popups like with Windows personal firewalls. I'm OK with having to edit a config file. This is for personal desktop Linux use, not a server.

View 1 Replies View Related

General :: Evolution 2.28.3 Message Filters Not Filtering To Assigned Folders?

May 27, 2010

I have created custom rules following: edit > message filters > incoming filter > (custom filter), none work. Also, by right clicking a message and, create rule from message > filter based by subject, sender, and recipients. Accepting all default (auto populated) conditons. None of the filters work at all? Seems this is a popular problem that has not found a solution except to use Thunderbird. not including ThunderbirdWhen I select a message that is supposed to be filtered to a specific folder and go to Message > Apply Filters. message goes to the assigned folder, but I want it to skip the inbox all together.

View 5 Replies View Related

Programming :: Input File - Grep Within Grep

Nov 22, 2010

I need to kind of grep within grep. My input file would be something like:

[Code]....

and I need to find the first occurrence of hello before MY PATTERN (hello 9008 in this case), so the output should be:

[Code]....

View 4 Replies View Related

Ubuntu :: How To Analyze Netstat

Apr 7, 2010

I need to know what this means and what to do to fix this. code...

View 9 Replies View Related

General :: How To Use Grep

Apr 7, 2011

I need to find file from ls - l by using grep and certain regexp.

In particular I need greep to see certain file ending, like let's say .txt but only using regex.

So it should be something like

ls -l | grep '^.+.txt$'

But that doesn't seem to work for me.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved