The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
23 views

filter text xml file

I have a big (with couple of hundred thousands records) XML file from which I'd like to filter only specific fields. example of the file construction: <A> <id>123</id> <B> ...
1
vote
0answers
15 views

Using rsync with the verbose option and filtering the information displayed

I am using rsync with the -a -r and -v options to copy files and directories from one server to another. This all works fine. But when I make a change, for example, to a single file on the source ...
5
votes
4answers
150 views

Remove lines from file up to a pattern, unless the pattern doesn't exist

I am attempting to write a filter using something like sed or awk to do the following: If a given pattern does not exist in the input, copy the entire input to the output If the pattern exists in ...
1
vote
1answer
47 views

regex usage in exim filtering

I'm trying to create an exim filter to block spam messages containing " 85% OFF" in the subject line. That's a blank space, then any two digits, then the percent sign, a blank space and the ...
1
vote
1answer
39 views

Obtaining unique lines with matching strings [duplicate]

I have a JSON like text file of records with duplicate ids that look like: {"ID":"93" , "ST":[42,77,51]} {"ID":"21" , "ST":[43,4]} {"ID":"94" , "ST":[65,11,4]} {"ID":"93" , "ST":[42,77,51,29,63]} ...
15
votes
9answers
695 views

Filter file by line number

Given a file L with one non-negative integer per line and text file F, what would be a fast way to keep only those lines in F, whose line number appears in file L? Example: $ cat L.txt 1 3 $ cat ...
1
vote
0answers
43 views

What exactly is the “Filter” option in CUPS' printers.conf?

I just stumbled over the Filter option that one can add to a <printer></printer> in CUPS' printers.conf. It is described in the docs ...
2
votes
0answers
32 views

Using interface file with LP and txt2pdf utility to transform print file to PDF

Our legacy application uses LP commands on Solaris 5.10 to print report files to printers throughout our org. However, now we have a remote location that won't have access to a printer (at least not ...
0
votes
2answers
49 views

Get or filter duplicated lines by column

I have a file with three columns and I would like to get duplicated lines by third column, for example: AAA = 342 BLABLABLA = 2 BBBx2 = 23 1+1 = 2 KOKOKO= 5 2x1 = 2 The output sould ...
0
votes
3answers
127 views

Filtering multi-lines from a log

Should this question be moved to stackoverflow instead? I often need to read log files generated by java applications using log4j. Usually, a logged message (let's call it a log entry) spans over ...
0
votes
0answers
37 views

Is there a way to move files marked as spam to another folder in Evolution?

The "Junk" folder in evolution is not an actual folder, as all of the messages marked as junk are still in the Inbox on imap. There is a filter option in Evolution based on whether or not a message ...
1
vote
1answer
146 views

DNS whitelist domains

I'm trying to set a couple of DNS servers to resolve only specified domains. My first attempt was to run DNSmasq and create a manual list of domains/IPs, like so: no-resolv ...
2
votes
1answer
205 views

macos - local port redirection using pfctl and syntax errors

I am running MacOS(really BSD), and I want to redirect certain traffic over an ssh tunnel using a a local forward. Seems easy enough, but I am repeatedly blocked by the ambiguous "/etc/pf.conf:29: ...
0
votes
2answers
91 views

Filter hyperlinks from web page and download all that match a certain pattern

I wanted to download all graphic files from our organisation's graphics repository web page. They are Illustrator (.ai) format and Corel Draw (.cdr) format. They are directly hyperlinked (i.e. <a ...
2
votes
1answer
36 views

Unix Filename ignore list [closed]

We are trying to set up Unix based server and we are trying to figure out if there is any way to forbid creating certain files on the server. I mean files like: .DS_Store, .BridgeCache, ...
3
votes
2answers
88 views

How do I efficiently select specific line numbers from a list of records?

I want to take a list of numbers representing line numbers of a source file I want to filter and filter those lines from the source file. How I can build a unix pipeline to extract these lines from ...
2
votes
0answers
138 views

Filter UDP packet in tc filter

Hello I'm trying to limiting the bandwidth on my iperf udp test (iperf -u). I use tc qdisc and class to make some assured rate and ceiling rate for it. However, I don't know what filter I should use ...
1
vote
1answer
48 views

I _WANT_ procmail to delay one users e-mail 10 seconds then continue processing

Thank You all for Stack Exchange. It is a wonderful resource and I have obtained answers many times in the past here. Thank You. I use procmail. I wrote my own spam filter in procmail (long with ...
2
votes
1answer
144 views

Hide lines based on multiple patterns

I'm using less to view log files quite a lot and every so often I'd like to filter the output by hiding lines which contains some keywords. In less it's possible to filter-out lines with ...
1
vote
1answer
3k views

Mail filtering with procmail in a postfix/dovecot system with virtual users

I had a postfix/dovecot system with mail users working. After unsuccessfully following a few tutorials online to enable procmail, now I have an unusable system. What I want is to enable procmail ...
1
vote
3answers
55 views

How to run executable program with filter

I want to run a shell script. This script have a long name. So I want to use filter for file. ex: ls | grep myfile | ./ Is it possible to execute a file with filter.
10
votes
2answers
816 views

Filter output of command by color

I am running a utility that doesn't offer a way to filter its output. Nothing in the text of the output indicates that a particular function failed but it does show in red. The output is so long that ...
3
votes
0answers
216 views

Extract particular words from Rsyslog %msg% facility

After lot of search on Google and reading all manuals available on man page and internet, I finally ask here. In my scenario, I have one rsyslog server working with mysql and a custom template ...
5
votes
2answers
12k views

My Postfix installation is sending out spam; how to stop it?

Since a few days, my web/mailserver (centos 6.4) is sending out spammails by the bunch, and only stopping the postfix service is putting an end to it. SMPT is set up to only accept connections over ...
1
vote
1answer
289 views

Create a Filter for Postfix on Virtual Mails

This is what I am trying to do: I have a server using Postfix on a Ubuntu precise 64bits and I have a table list of emails in /etc/postfix/virtual, like this: artz@mydomain.com artz@gmail.com ...
2
votes
0answers
327 views

IPtables rule to double NAT [closed]

Let me rephrase it.. I just need an IPtable rule to do double NAT-ting.. Host A - Host B - Host C - Host D Host B should do both source NAT and destination NAT, so that my request from Host A ...
0
votes
1answer
872 views

Unable to launch Gnome System Log Viewer after setting filters

I am unable to launch Gnome System Log Viewer after setting some filters. This is so, even after rebooting and reinstalling this GUI program. I found the following relevant line in /var/log/messages: ...
6
votes
3answers
8k views

Filter a .CSV file based on the 5th column values of a file and print those records into a new file

I have a .CSV file with the below format: "column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10 "12310","42324564756","a simple string with a , ...
0
votes
2answers
261 views

Linux Distrib with build in Web filter solution

Is there any distribution with a built in solution for web content filtering for my network?
0
votes
1answer
56 views

Linux Alternative for Netclean?

I am looking for an alternative for blocking Child Sex Abuse content within the Enterprise environment. Or Is there any way i could have a link to the database containing hashes for the digital ...
2
votes
1answer
275 views

remove tc filter (Traffic Shaping)

How can I remove a single filter? tc filter show dev peth1 shows filter parent 1: protocol ip pref 16 u32 filter parent 1: protocol ip pref 16 u32 fh 800: ht divisor 1 filter parent 1: protocol ip ...
2
votes
1answer
3k views

Search and Filter Text on large log files

I use the tail, head and grep commands to search log files. Most of the time the combination of these 3 commands, in addition to using pipe, gets the job done. However, I have this one log that many ...
3
votes
3answers
722 views

grep filter all lines plus one before each hit

I want to parse some output so I exclude all lines that contain either foo or bar, as well as all lines immediately preceding those lines. For example: echo " 1 some line 2 line to exclude because ...
0
votes
4answers
375 views

Use grep with or [duplicate]

How do I search in a textfile with grep for the occurrence of a word or another word? I want to filter the apache log file for all lines including "bot" or "spider" cat ...
16
votes
6answers
5k views

Can ps display only non kernel processes on Linux?

How can I ask ps to display only user processes and not kernel threads? See this question to see what I mean...
9
votes
5answers
6k views

How to remove multiple blank lines from a file?

I have some text-files I use to take notes in - just plain text, usually just using cat >> file. Occasionally I use a blank line or two (just return - the new-line character) to specify a new ...
3
votes
2answers
656 views

not getting desired output with cut command?

[root@localhost ~]# ps aux | grep ata root 19 0.0 0.0 0 0 ? S 07:52 0:00 [ata/0] root 20 0.0 0.0 0 0 ? S 07:52 0:00 [ata_aux] root ...
2
votes
1answer
538 views

curses-based program for selection item from the list

Is there in the linux any program which can represent (via pipe or something like that) results of such commands as, for example, ls, cat, grep, ps etc, by means of curses (for example as listbox)? So ...
3
votes
1answer
1k views

Savings emails as individual files using Procmail

I installed Getmail to retrieve emails from another email server and Procmail to filter the incoming emails. (I am running Debian/Squeeze.) The recipe I created has this code: :0: * ...
2
votes
2answers
99 views

Filtering the Xth element in a row?

For example, I want to get only the 3rd element in each row when I call: xinput --list --short|grep "slave pointer" I get the output: ⎜ ↳ Virtual core XTEST pointer id=4 ...
5
votes
1answer
355 views

What does this tcpdump line means?

Reading the manpage of tcpdump I found this example tcpdump 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net localnet' but I don't understand it, especially the last part. The ...
6
votes
5answers
25k views

ls list files not matching given string in filename

I have a directory in which lots of files (around 200) with the name temp_log.$$ are created with several other important files which I need to check. How can I easily list out all the files and ...
3
votes
1answer
1k views

What do you filter / exclude list when doing backup with rsync? [closed]

I'm trying to build a comprehensive filter / exclude file, to prevent backuping stuff that doesn't make sense do backup, such as temporary / cache data or easily recreatable files. I would appreciate ...
7
votes
4answers
1k views

Find files alphabetically before a given string

If I have a directory full of files and sub directories. What is the best way to list just the regular files which fall alphabetically before a given string? Currently the best I can do using bash is ...
18
votes
6answers
833 views

How stable are Unix shell “stdin/stdout APIs”?

grepping, awking, sedding, and piping are day-to-day routine of a user of any Unix-like operating system, may it be on the command line or inside a shell script (collectively called filters from now ...
2
votes
1answer
86 views

Process movie intelligently

Let's say you like the jungle. You have a few Survivor episodes and Predator movies. You'd like to separate the jungle clips from clips involving humans. Maybe to play as a projector show at a party, ...
3
votes
6answers
3k views

Text file look-up by column

I have a file in this format: [#] OWNER_NAME NAME SIZE [6] Robottinosino Software 200 [42] Robottinosino Ideas worth zero 188 [12] ...
2
votes
2answers
1k views

How can I get entries for a given time period from a 400MB+ log file?

I have a 400MB+ Tomcat log file (catalina.out). How can I pull out entries for a given time period?
2
votes
2answers
5k views

Force to use specific DNS provider at network

OpenDNS offers a quite simple way for internet filtering by categories. Of course who could get the correct IP address can easily bypass the filter but it would be enough for my expectations. The ...
7
votes
6answers
19k views

iptables to block https websites

I wish to block a few websites that also run upon https, like facebook, twitter, and gmail, in my organization. Squid is not supposed to be used here as per the orders from higher management. We can ...