General :: Grep - How To Extract Mask Value

Feb 24, 2011

I want to extract some information from ifconfig,
E.g.:
inet addr:123.123.123.123 Bcast:123.123.123.255 Mask:255.255.254.0
I want to extract the mask value, how can I do that? I've tried using
Code:
grep -o "Mask:*" test1.txt
but it only outputs "Mask:" I need to get 255.255.254.0

View 3 Replies


ADVERTISEMENT

Ubuntu :: Using Cut And Grep To Extract Information?

Aug 2, 2011

How would I use cut or grep to take this line :

Code:

Load......................... 198 Watt(22 %)

and make it into this information, in a text file :

Code:

198 Watts

If you don't mind, please explain the process, as I have been trying to figure this command out, and I must be missing something.

View 9 Replies View Related

General :: Script To Covert Binary Value Into Subnet Mask?

Feb 11, 2010

for providing an earlier solution from which I have modified and butchered the below script.The intended purpose of this script is to take a subnet mask for example 255.255.255.0 and turn it into the corresponding wildcard mask value in this case it would be /24I have got to the point where I have the binary value, the script is

Code:
#!/bin/sh
#takes mask from ifconfig

[code]...

View 4 Replies View Related

General :: Mask Local Timer Interrupts In User Space?

Oct 27, 2010

I am trying to figure out how to mask local timer interrupts on a specific core of a multicore system from within user space. The interrupts are causing latency spikes of 3-10u that we would like to remove. We are only running 1 thread on the core h everything shielded except for these timer interrupts. This thread makes no system calls and thus is never getting context switched out. I am not looking to turn them off entirely but rather turn them off, run my code, turn them on in a continuous loop. The thread runs in user space which we are hoping to maintain. We also have no desire to modify the kernel if possible. I've read about using spinlock_irqsave() but it appears (not positive) that it must be used within kernel space.

View 3 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 Networking :: Anyway To Mask IP?

Apr 13, 2010

Is it possible to Mask my IP in Ubuntu?

View 2 Replies View Related

OpenSUSE :: Date Mask In Ls -l Output

May 18, 2011

I just installed a OpenSuse 11.4 box. Now when I do a 'ls -l' I see the date format different than on all my other boxes even though I have identical regional settings. Is there a way (env var) to control this behaviour ?

View 6 Replies View Related

Ubuntu Networking :: How To Add Route Mask

Mar 11, 2010

How can I add this to Ubuntu so that I can effectively use both networks connected to my machine. All I do in WinXP is run this from the command prompt: route -p add 10.0.0.0 mask 255.0.0.0 10.15.122.9

View 3 Replies View Related

Networking :: Mask My Ip Address With Ubuntu 10.04?

Aug 9, 2010

How do i mask my ip address with ubuntu 10.04

View 1 Replies View Related

Networking :: Most Of Traffic Can Be Routed Simply By IP/mask?

Jun 28, 2011

I have a linux desktop with two connections - fast eth0 and slow modem ppp0. Most of traffic (e-mail, DNS, NTP) can be routed simply by IP/mask. But how about http and p2p (torrents, DC++)? Routing by IP is unacceptable, because there is very huge amount of routing rules. I need route http packets (80 port) through ppp0, p2p through eth0 (10000:65535 ports). I've found that splitting traffic by port is possible with marking packets for different gateways. For begin I cleared all tables and bringed up connections.

Code:
# iptables -F -t mangle
# iptables -F -t filter
# iptables -L -t filter
Chain INPUT (policy ACCEPT)

[Code].....

View 7 Replies View Related

CentOS 5 :: What Does Exclamation Mask Followed By Question Mark Mean?

Mar 25, 2009

In bash, what does an exclamation mask followed by a question mark mean?

View 1 Replies View Related

Ubuntu :: Find IP Addy / Subnet Mask / Gateway?

Jan 18, 2010

How do i find my internet address, subnet mask, gateway,etc in Ubuntu?

View 1 Replies View Related

Slackware :: Make K3b Write Files With Correct Mask

Jan 14, 2010

I've blown a couple of DVDs trying to burn them with correct file masks (directories and files are read-only). There doesn't seem to be any documentation for K3b (building the index doesn't do squat and the help says "The file or folder help:/k3b/index.html does not exist"). I can't seem to figure out a setting that simply copies everything the "way it is."

View 7 Replies View Related

Ubuntu Security :: Create 760 But Even If Change The Mask It Still Generates The Same Permissions?

Jan 23, 2010

I have a setup samba and want to get the correct security permissions when my wife creates / copies files from her camera onto the shared/mapped drive on her new laptop (windows 7) I want the permissions set to 770 or maybe 760. See my config below.

Now I can get it to create 760 but even if I change the mask it still generates the same permissions. After every change I restart the samba service. the umask is still 0022, do not know if that makes a difference? The directory permission's are correct with this mask. Do I need to look at groups?

[Code]...

View 1 Replies View Related

Ubuntu Security :: Clean Mask For Files And Folders Through Samba

Feb 9, 2010

Still working on the mask of files for shared folder. I now have a shared folder with the exact behavior I expect :
Code:
sudo addgroup share_group
sudo mkdir /media/volume/shared_dir
sudo chgrp share_group /media/volume/shared_dir
sudo chmod g+s /media/volume/shared_dir
sudo chmod 770 /media/volume/shared_dir
sudo setfacl -d -m group::rwx /media/volume/shared_dir
sudo setfacl -d -m other::--- /media/volume/shared_dir
emma@box:/media/volume/shared_dir$ ls -al
total 8
drwxrws---+ 2 root share_group 4096 2010-02-09 12:53 .
drwxr-xr-x 8 root root 4096 2010-02-09 11:58 ..
-rw-rw----+ 1 emma share_group 0 2010-02-09 12:53 test
By default, user from the group can modify this file. That's perfect.

I have define the share in Samba this way :
Code:
[share]
comment = Shared Folder
path = /media/volume/shared_dir
browseable = yes
guest ok = no
read only = no
hide dot file = yes
# force group = share_group
# create mask = 0660
# directory mask = 0770
# force create mask = 0660
# force directory mask = 0770

When drag & dropping a file in this share, here is the default mask:
Code:
emma@box:/media/volume/shared_dir$ ls -al
total 192
drwxrws---+ 2 root share_group 4096 2010-02-09 12:54 .
drwxr-xr-x 8 root root 4096 2010-02-09 11:58 ..
-rw-rwx---+ 1 emma share_group 6148 2010-02-09 12:54 .DS_Store
-rw-rwxr--+ 1 emma share_group 176684 2009-12-21 23:33 IMG_7487.jpg

So the dropped file have execution rights for the group, and read access for other. I expected it to have the same rights than the file created directly using the touch command. I tried to play with the mask options, without success. The file has been dropped from my mac, which is a Unix like OS. I guess that some authorization access are inherited from the original file, for the user and other parts. But where does the group authorization come from ? Moreover, is is possible to define in samba a default mask, whatever the authorization of the original file?

View 1 Replies View Related

Ubuntu :: Mask/Alter Mac Address From Connections Coming Through Proxy

Nov 17, 2010

I have a local proxy server running on my computer, but I want to add a twist to it. I have multiple connections going through the proxy, but what I'd like to is that all outgoing connections Mac Address' will be different from the one the connecting systems. Mask or even alter them, if possible.

Yes, I know the idea itself sounds weird, but I'm attempting a few ideas for a project I'm working and I ran in to this problem. Please note that it's impossible for me to change the MAC Address' on the systems connecting through the proxy (they're gaming consoles, to be specific.)

I'm currently running the latest version of Ubuntu.

View 1 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

General :: Trying To Extract Tar.bz2 But Getting Error

Jun 29, 2010

I am trying to extract files from 2010_06_25_RT3572_Linux_STA_v2.4.0.0.tar.bz2 and every time I try to extract it it comes up with that error. I went under Applications, Ubuntu software center, typed in .tar.bz2 and installed Archive manager, Fast, multi-threaded bzip2 utility.

I am not sure what to do anymore since I have just install Ubuntu

View 8 Replies View Related

General :: How To Extract A Bin File

Jan 21, 2011

I know a .bin file is an executable file type in linux. We have an error after installing it and it referes to a file name and a line number within the file. I'm trying to find out if the file is part of the .bin file but I need a way to see what's inside of it or extract it.

View 5 Replies View Related

General :: Extract .ISO On Ubuntu

Aug 23, 2010

I have linux ubuntu 10.04... and i download a .ISO of windows 7. because i want install windows 7 because i need some programs of windows for my work.. so i need make a dual boot. but the problem it's not net....

So i have a .ISO ( of windows ) and i have a notebook. ( no Drive cd. only USB PEN's ) where i can Extrat the .iso file ( windows system ) to my pen ? i cant extrait i try but nothing works.

View 13 Replies View Related

General :: Extract Substring Using Sed

Feb 22, 2011

I would like to extract a substring using sed.

the String is :
[1365465464.1654] fasfa fsaf df16A fas 2.2 (7/2134)

number result :
16A

View 1 Replies View Related

General :: Extract A Value From A File With Awk?

May 17, 2011

it is possible to extract a value from a file with awk, grep or something similar. I have a file like this...

ID1,NAME1,LAT1,LON1,VAR1=5.0,VAR2=7.0,VAR6=9.0,VAR15=0.0,VAR20=0.0
ID2,NAME2,LAT2,LON2,VAR1=6.0,VAR15=1.0,VAR20=5.0,VAR22=0.0
ID3,NAME3,LAT3,LON3,VAR1=10.0,VAR2=20.0,VAR3=8.0,VAR10=3.0,VAR15=0.5,VAR20=9.0

[code].....

and I want to extract VAR15 from each line (which can be at any column unfortunately - columns separated with commas - csv file), or VAR15 together with LATn,LONn from each line. Is it possible to do it with awk, grep or something other in linux?

View 11 Replies View Related

General :: How To Extract PDF Files

Feb 20, 2010

How to I extract PDF Files?

View 2 Replies View Related

Ubuntu :: 10.04 - Unlock Keyring Password Mask Symbols (****) With Small Font Size

May 3, 2010

It's about the promt for default keyring password after ubuntu boot. I cant get a screen-shot as print-screen doesn't work at that point.

The password mask (*******) symbol font size is smaller than any other password prompt (for instance gksudo). Is it only me ?

Should I report it as a bug ?

It's a minor problem but may be it's caused from something more serious as I have other problems.

Also this dialog window (of the keyring prompt) doesn't "woble". By that I mean that the effects that I've set are not applied to this window?

View 4 Replies View Related

Programming :: Shell Script And Administration Of A System - Change Or Set The IP Address And Subnet Mask

Aug 26, 2010

tasks of an administrative level that we can use Shell Script to automate them. It's a kind of homework for me to figure out how to automate those tasks. Using PHP and Shell Script design and develop a Web Interface to change or set the IP Address and Subnet Mask of the UNIX / Linux System. The related services must be restarted automatically for the new IP Address and Subnet Mask to take effect. No user name and password should be asked for when using that Web Interface. How would you do it?

View 10 Replies View Related

General :: GREP On Words With 2 Or More Z's?

Dec 21, 2010

I need to grep a dictionary file.Only the words that contain 2 or more z's and only 1 b needs to be listed.

View 1 Replies View Related

General :: Grep Not Working?

Jul 15, 2010

I am trying to grep for A records in a bind zone file but I am failing.I am trying: grep "s+As+" db.domain.comBut there are no results.

View 12 Replies View Related

General :: How To GREP String

Jul 29, 2010

Today, i checking my error log of Apache. I have look many IP brute scan URLo, i collect, export that to ip.txt and i need grep IP with connection >=8I don't know command to solve that. Example ip.txtQuote:

101 210.13.73.30
161 58.210.77.98
164 115.168.71.87

[code]....

View 2 Replies View Related

General :: Use Grep, Cut, Or Awk To Get An IP From A File?

Feb 3, 2010

I have a file which contains a line like this:SERVER=10.205.110.19 How can I cut out the IP and assign it to a variable?

View 4 Replies View Related

General :: Using Grep And Expressions?

Mar 28, 2010

How can I use grep expressions so that i can find strings like the ones bellow:

New York, NY
Virginia, VA
Oregon, OR

As you can see each city starts with capital letter then it follows up with a comma, and then with the Abbreviation of the city. I used :

Code: grep -w '[A-Z].*[a-z][,][' '][A-Z][A-Z]' filename But i get no results.

View 2 Replies View Related







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