Ubuntu :: Cat/grep, Excluding Phrase From Result?

Feb 2, 2010

I would like to take a file looking like...

uid=user1,ou=People,dc=company,dc=com
uid=user2,ou=People,dc=company,dc=com
uid=user3,ou=People,dc=company,dc=com

[Code]...

View 5 Replies


ADVERTISEMENT

General :: Excluding Multiple Patterns From Grep?

Dec 13, 2010

I have to write a script which would search the IP adesseses in a given directory.

Below is my command.

Code:

grep -HwrnI --exclude=*.log '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' *|grep -v '/.svn/'

I have to exclude the following from search resluts.

1. Comments

a. Can be starting with /, * or #...

b. Cane be between a line

EX: some text... #comment1

View 9 Replies View Related

General :: How To Grep - Internet Doesn't Give Any Result In System

Dec 17, 2010

I want to search files (basically .cc files) in /xx folder and subfolders. Those files (*.cc files) must contain #include "header.h" AND x() function. Clearly, I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings.

I tried several ways, and got only files with header.h OR x(). Some examples given in Internet doesn't give any result in my system. I am using Fedora 8.0 in my PC and I have grep 2.5.1 version.

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 Security :: Ssh Client Pass Phrase Window Has Gone

Apr 11, 2011

I'm using ssh key based authentication and I was pleased to find that when I set it up out of the box when I connected to my ssh server it prompted me with a password window rather than typing into the terminal and it remembered the pass phrase from one connection to the next.

For some reason it's stopped showing me the window, instead I'm logging in through the terminal, and it's stopped remembering my pass phrase between connections. since I don't know what the program was called that gave me the login box it's rather hard to search for.

View 4 Replies View Related

General :: Unsafe To Have A Ssh Key With Out Pass Phrase?

Jul 27, 2010

Is it complete unsafe to have a ssh key with out pass phrase ?

View 4 Replies View Related

General :: SSL Server Key W/O Pass Phrase?

Jul 16, 2010

I'm having trouble trying to generate an SSL server key WITHOUT a pass phrase.

Here's what I did. Wrong, obviously.

Code:

View 1 Replies View Related

Ubuntu :: Key Based So Dont Have To Put In The Password Of User Or Pass Phrase?

Aug 29, 2010

want key based so i dont have to put in the password of user or passphraseI have edited the ssh_configfrom #Protocol 2, 1 to Protocol 2 with out the #I have edited the sshd_configPermitRootLogin yes to PermitRootLogin no#PasswordAuthentication no to PasswordAuthentication noi have the same file changes on the other 2 computers. I have 3 computer all together 1 xbuntu and the other 2 are ubuntu. All have the authorized_keys with chmod 400 persmissons id_dsa.pub and known_host fileone has id_dsa and it will not talk to the other computer either

aceraspire@momacer:~$ ls -l .ssh
total 16
-r-------- 1 aceraspire aceraspire 605 2010-03-25 11:21 authorized_keys

[code]....

View 3 Replies View Related

Programming :: Awk To Extract Phrase Between Two Words On A Line?

May 25, 2010

im trying to find a way to extract the phrase between the words Connection and is (ie the underlined words below). Can we use awk to do this? How? Is it the best command to use?

Code:

[06:25:00][i] Connection at Plant A is live
[06:25:00][i] Connection at Building_C is not live
[07:25:00][i] Connection at Terminal D is down

View 12 Replies View Related

Fedora :: 13 X64 Froze At Enter Pass Phrase - How To Login

Sep 8, 2010

Some of your private key files are encrypted for security reasons. In order to read them you have to provide us with the pass phrases. Server your.server.com:55 (RSA)

Enter pass phrase:

Server www.blahblahblah.com:55(RSA)

Enter pass phrase:

How to login ?

The cursor is blinking but I am unable to enter the pass phrase; the only thing I can do is press the power button to shutdown. Even if I leave the PC running for a hour I can't type anything.

I know how to resolve the problem if I am able to login.

View 3 Replies View Related

Fedora :: Encrypted Root, Getting The Following After Entering Pass-phrase?

Jul 3, 2011

Been using fedora for a few years now, got a boot error this morning I just have no idea were to start looking. Got a luks encrypted root, getting the following after entering pass-phrase:

...
Starting Stdio Syslog Bridge.
Starting /dev/cgroup failed, see 'systemctl status dev-cgroup.mount' for details.

[code]....

View 2 Replies View Related

Fedora Networking :: Set The WPA Pass Phrase With System-config-network?

Jul 14, 2010

I was trying to set my wireless to start up when the computer is booted like the regular ethernet eth0 but I can't figure out how to set the WPA pass phrase with system-config-network

View 2 Replies View Related

General :: Find A Phrase/word Recursivly In A File Tree?

Aug 31, 2010

how do I find a phrase/word recursively in a file tree in Linux?I tried find . -name ./* | grep my_phraseand I tried grep -r "register_long_arrays" *

View 5 Replies View Related

General :: Unix - 'man' Command: Search For A Word/phrase And Cycle Through?

Jun 29, 2011

When looking for a certain word or phrase in the man page of linux command, one can type '/' followed by the word/phrase to search for it. What I'd like to be able to do is to search for the next occurrence of the word/phrase without having to type it out again. Kinda like when you use 'ctrl+f' in a browser to search for a word, and then press 'enter' to find the next occurrence of that word.If this is possible to do, how do I do it?

View 2 Replies View Related

Ubuntu :: Compression Excluding Certain Ascii Characters?

Jun 8, 2011

I am working on a project where I am dialing out of a modem!! Old stuff, ya, but the modem allows my device send info from remote sites from my datibase through a phone line so that this IT departments dont have to worry my device being a security issue on their networks.

Any way, the modem I'm using isn't incredibly well designed, and when a certain ascii char is read by the modem, it reads it as an EOF indicator. It is also important that the files I send are compressed.

My question is: Does anyone know of a compression format that allows ME to dissallow IT's use of certain ascii chars?

just as an illustration:

Device --------> Modem ---------> Off-site

and the Modem stops talking to the device when a certain char is passed to it.

View 1 Replies View Related

Ubuntu Installation :: Excluding A Package When Dist-upgrade'ing?

Feb 6, 2011

Is there a way of excluding a software package when issuing the 'apt-get dist-upgrade'command? For example the newer 'pm-utils' packs are incompatible with my hardware and my laptop starts to glitch. What I do is I uninstall and replace the package every time I run 'sudo apt-get update && apt-get dist-upgrade'. Which is kind of annoying. I know that you can hide updates from the update manager, but what about the terminal? I'm sure there are codes like "dist-upgrade [except pm-utils]"

View 2 Replies View Related

Programming :: Excluding Files From Find?

Oct 22, 2010

I have spent the last hour searching for a solution to this, but I can't get it to work. Here is what I am trying to do:

I have directories for different months in one folder. So for example Code: ../folder/Jan/
../folder/Aug/
etc. Some of the folders have a dot in front of the month as so: Code: ../folder/.Sep/
../folder/.Oct/

[Code].....

I am trying to find all the csv files EXCEPT those in a folder that has a dot. For example I want all the csv files in ../folder/Jan/ but I want none in ../folder/.Oct/.

I also want to exclude all the files in the /Aug/ folder that represent days 10-31.

Here is what I have so far: Code: find /some_path/folder/ ( ! -name "Aug[10-31]*.csv" ! -path "/.*/" -name "*.csv" ) | more This command lists all the .csv files except those in the /Aug/ files. So it just ignores the /Aug/ folder completely but lists every other .csv file.

View 3 Replies View Related

General :: Excluding Directories With Find?

Jun 10, 2011

I am trying to exclude 2 directories with find and pass it into cpio. I have tried

Code:
find . -depth -path '.evolution' -prune -o -path '.gconf' -prune -o -print|cpio -aov > /media/caca/full$date
./.gconf/apps/evolution/memos/%gconf.xml
./.gconf/apps/evolution/memos

[Code]....

View 4 Replies View Related

Software :: Zip - Excluding Whole Directory Path ?

Sep 12, 2010

I'm trying to compress with zip for linux utility a file

Is need to be done (example):

But I would like that in the zip file there is only one file: source.file instead the whole directory path /usr, /src,... and the file.

I can't move up to the directory /usr/src/ to execute the command.

I must do this from / directory.

If this possible? I Windows systems even if I do the zip C:directory1directory2source.zip C:directory1directory2source.file, it does what I need: a Zip in directory2 with just the file source.file.

I've been looking up the man page for zip, but did not find anything useful, tried, -j, -D with no success.

View 1 Replies View Related

OpenSUSE Network :: Nfs And /etc/exports - Excluding Certain Subdirectories

Jun 30, 2011

I have a nfs share on my 11.4 workstation at /abcd. I'd like to export everything under /abcd except for one directory /abcd/dontexport

I searched online for such an option but only came across noaccess option which doesn't seem to work.

exportfs says it is an unrecognized option if I run "exportfs -ra"

This is how my /etc/exports looks like:

Code:
/abcd*(rw,wdelay,root_squash,no_subtree_check,anonuid=12345,anongid=6789)

View 2 Replies View Related

General :: Excluding Executables In A Sub-directory From Tar Backups?

Jul 29, 2010

Just trying to set up a new backup using tar, but there are a few things I dont want to include. Using --exclude I can exclude sub-directories, but how do I exclude specific files in a subdirectory that are (for instance) executables or have a specific extension?

View 5 Replies View Related

Networking :: IPTables NAT - Excluding Subnets For IPSec VPN

Feb 27, 2011

I have a Ubuntu 10.10 box which i've developed an IPTables Firewall script and is forwarding my ports correctly. This service also runs Openswan VPN Server with 2 VPN's, which is also working well.

I have come across a small snag with excluding the multiple VPN subnets I have from the NAT on this box.

I have the line in my configuration file:

-A POSTROUTING -o eth1 -s 10.172.1.0/24 -d ! 192.168.5.0/24 -j MASQUERADE

Which when added to IPTables does make the VPN come to life. But I can't seem to get it to add the second subnet. Unfortunately, I can't do a blanket exclusion such as 192.168.0.0/16 because the second VPN is on a Class B subnet address which I cannot change.

View 1 Replies View Related

General :: Zip All The Files Excluding Todays File?

Jun 21, 2011

At present in my server the log folder was filled up and causing memory issue. So I am planning to write a script in such a way that the files which are older than 30 days will be deleted and also need to find the files which were not compressed and need to compress this file. Compression will exclude if the file was created on the same day.

View 12 Replies View Related

Software :: Excluding Directories And Files In Tripwire?

Jul 12, 2010

I have tripwire 2.4.1 up and running on one of our servers, and I am now in the process of configuring it to exclude some files and/or directories that are known to change periodically between integrity checks.

I did some reading on the subject, and one file that came up was the tw.config file. However, when I did a search for the file, there was no instance of it on the server. My next thought was to modify the tw.pol file, and I did try to list some files to be excluded. However, when I tried to update the policy, I got an error message which indicated the syntax that I entered within the tw.pol file was incorrect.

If the tw.config file does not exist, can I create it, and modify the tw.pol file to indicate where the file is located on the server?

View 1 Replies View Related

Programming :: Excluding Directory From Backup In Bash?

Jun 30, 2011

I've got the following code and kludge. It's working okay except that there's a directory called "Archive" which I don't need to backup. I've tried various combinations of &&, -a, etc., and I'm kind of at a loss for getting this right.

Here's the code I have so far:

Code:
#!/bin/sh
# backup subdirs as individual tarballs with prepended timestamps and
# move them somewhere else.
# --exclude "/path/to/dir/*" (Doesn't seem to work)

[Code]...

How can I write that line so that I can loop through all of the subdirs, tarring them up, but excluding the "Archive" subdirectory?

View 6 Replies View Related

Red Hat :: Excluding Unlink To A Particular File In Audit.rules?

Apr 11, 2011

I am running RHEL 5.4 Server (32-bit) and have my audit.rules file set up per a template that I am required to use. There is one particular rule that audit is auditing the unlink of files. With this set, my log files are filling up very fast, as there is a particular app that constantly touches/ deletes a couple of files, which the unlink is catching. Here is the audit rule:-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteI commented out the "-S unlink" and my logging returns to normal (as expected). For right now, I was wondering if there was a way to set this rule up to exclude these couple of files from what auditd is capturing?

View 1 Replies View Related

General :: Find Command \ Search File Excluding The NFS?

Jan 20, 2010

I want to search file excluding the NFS ...find / -mount -name 'filename' restricts the search only in the root disc partition,but the file can be in other partitions alsoIs there any way to exclude the NFS only.

View 2 Replies View Related

Red Hat / Fedora :: Excluding Unlink To A Particular File In Audit.rules?

Apr 11, 2011

I am running RHEL 5.4 Server (32-bit) and have my audit.rules file set up per a template that I am required to use. There is one particular rule that audit is auditing the unlink of files. With this set, my log files are filling up very fast, as there is a particular app that constantly touches/ deletes a couple of files, which the unlink is catching. Here is the audit rule:-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteI commented out the "-S unlink" and my logging returns to normal (as expected). For right now, I was wondering if there was a way to set this rule up to exclude these couple of files from what auditd is capturing?

View 1 Replies View Related

Software :: CentOS - Yum Update Excluding Current Kernel Possible?

Mar 5, 2010

I am running CentOS 5.x and want to yum update, but I do not want to touch the kernel. How can I exclude the kernel update and prevent yum from removing my current kernel?

View 3 Replies View Related

Fedora Servers :: Excluding Images Pdfs Etc From Https Routi

Nov 1, 2009

I am a squat on advanced Apache work. I would get a basic SSL functionality to work. So URL...works fine and gets me all the login windows I designed. however currently all the images and other extensions like .pdf are also using the https routing.some image referred on that https link e.g. URL...can be displayed using https but not http.I would like to JUST limit https usage to the login window html and ALL other images pdf's not secured html ( one that do not need password ) should use HTTP NOT HTTPS.

View 6 Replies View Related







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