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
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
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.
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 ?
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
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.
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."
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?
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?
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.
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
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.
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.
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?
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?
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: