General :: Awk Script To Filter And Delete?
Jul 5, 2011
I am trying to figure out how to write an awk script(or something better if it exists) to read a text file that contains lines like below.
4517-s-1295546289-10:58:09-2011-01-20.wav | 19990 KiB | 2940.5 KiB/s | binary | 100%
4517-s-1303247233-15:07:13-2011-04-19.wav | 167 KiB | 2918.3 KiB/s | binary | 100%
4517-s-1301431748-14:49:08-2011-03-29.wav | 36220 KiB | 2589.3 KiB/s | binary | 100%
[code]....
View 6 Replies
ADVERTISEMENT
Mar 11, 2011
All, i am receiving numerous entries for programs such as snmpd in my messages file. Is there a way to add a rule somewhere to have these and other annoying unimportant entries go to /dev/null or something?
I tried adding an entry to /etc/syslog.conf, but that hosed any logging into the messages file, so maybe i added it wrong?
I want to try and do this with out installing anything additional.
View 6 Replies
View Related
Oct 27, 2010
I'm trying to understand rsync filters .. but it isn't goig to well.I want to rsync only files with a specific extension (.gz.des3). Could someone please tell me how to add such filter to the rsync commandline (not a seperate filter filer).
View 2 Replies
View Related
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
May 30, 2010
I have the following command that I run on cygwin:
find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | xargs du --max-depth=0 > foldersizesreport.csv
I intended to do the following with this command: for each folder under /d/tmp/ that was modified in last 150 days, check its total size including files within it and report it to file foldersizesreport.csv however that is now not good enough for me, as it turns out inside each
/d/tmp/subfolder1/somefile.properties
/d/tmp/subfolder2/somefile.properties
/d/tmp/subfolder3/somefile.properties
/d/tmp/subfolder4/somefile.properties
so as you see inside each subfolderX there is a file named somefile.properties inside it there is a property SOMEPROPKEY=3808612800100 (among other properties) this is the time in millisecond, i need to change the command so that instead of -mtime -150 it will include in the whole calculation only subfolderX that has a file inside them somefile.properties where the SOMEPROPKEY=3808612800100 is the time in millisecond in future, if the value SOMEPROPKEY=23948948 is in past then dont at all include the folderin the foldersizesreport.csv because its not relevant to me.so the result report should be looking like:
/d/tmp/,subfolder1,<itssizein KB>
/d/tmp/,subfolder2,<itssizein KB>
and if subfolder3 had a SOMEPROPKEY=34243234 (time in ms in past) then it would not be in that csv file.so basically I'm looking for:
find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | <only subfolders that have in them property in file SOMEPROPKEY=28374874827 - time in ms in future and not in past | xargs du --max-depth=0 > foldersizesreport.csv
View 1 Replies
View Related
Feb 10, 2010
I'm building my first BASH programs and I have a hard time. I can't do a search in a folder and filter only script files without extension, the problem is to differentiate the script files from the others. I tried with ls I tried with find and i don't find a way to make it work.
View 8 Replies
View Related
Dec 13, 2010
I would like to know how to use grep command to filter the log files created between 3:00 PM to 4:30 PM in buch of log for whole day in different headings. This files resembles like sar file in linux.
View 5 Replies
View Related
Jul 1, 2010
I am trying to list all traffic from 1 IP address but filter out port 1057.I keep getting syntax errors. I've tried:
Code:
ngrep -e host xx.xx.xxx.170 not port 1057
ngrep -e port 1057 -x host xx.xx.xxx.170
ngrep -e not port 1057 -x host xx.xx.xxx.170
etc.
View 7 Replies
View Related
Jan 7, 2011
I want to filter and block failed attempt to access my proftp server. Here are few line from the /var/log/secure file:Quote:
Jan 2 18:38:25 server1 proftpd[17847]: server1.XYZ.com (93.218.93.95[93.218.93.95]) - Maximum login attempts (3) exceeded
Jan 2 18:38:27 server1 proftpd[17864]: server1.XYZ.com (93.218.93.95[93.218.93.95]) -
[code]....
View 9 Replies
View Related
Apr 18, 2010
Instead of moving to trash, how can i make the delete button delete? Delete is already enabled on the right click menu.
View 7 Replies
View Related
May 9, 2010
SO after using Testdisk to recover some images, the folders recup_dir.1 & 2 have saved in my FIle System area, when ever I try to press delete noting happens. I have also tried rm -f -rrm -f -fIt still dont delete, I have also deleted my user account and made a new one, but the files are still there.
View 4 Replies
View Related
Sep 25, 2010
I am trying to use an old box as backup server. I have tried a couple of possibilities along the lines of:
Quote:
rsync -a --delete --progress --log-file=/home/$USER/info.txt -e ssh /home /etc root@192.168.0.106:/mnt/back
The problem is it does not delete files that has been removed from my local system?
I run the command as root on the local system.
(I realize I should properly not ssh into the server as the server's root but I'm having trouble with the permissions and I want to make sure everything else works before messing around with it)
View 2 Replies
View Related
Feb 18, 2010
Why is there no Delete when I right click like there is with Windows in ubuntu? Pretty much everything else is there like new folder and so on Is there some way to add it? Also why when i delete something does it not ask me if I am sure that i want to delete that file?
View 6 Replies
View Related
Nov 1, 2010
I just can't stand knowing that there's a slight problem with my PC.I have roughly 12.5 Gigs of files, mostly movies that are multiple clones of a particular movie (which was an entirely different problem altogether) and I CANNOT DELETE THESE THINGS! There has to be a simple way to do it from terminal, problem is, I can't seem to find the trash directory in terminal.
View 3 Replies
View Related
Apr 3, 2009
It seems that rpm in CentOS has a filter to change the phrase "Red Hat" to CentOS
I understand why such a filter exists - but here's the problem -
From the EPEL rhnlib package, when viewing with rpm -qi -
Description : rhnlib is a collection of python modules used by the CentOS Network [url] software.
That gives an incorrect impression that [url] is a CentOS web site.
Package - rhnlib-2.5.10-1.el5 from EPEL
If you download the src.rpm from EPEL and view it with rpm -qip you get the filtered description, but when you install the src.rpm and look at the spec file, it clearly says CentOS.
I think you meant Red Hat. - pschaff
Perhaps instead of filtering the displayed meta data, the CentOS build system could do the filtering before the spec is built?
That way packages that are not built by CentOS will not be impacted, and cases in CentOS where the filter isn't appropriate could be handled by a list of package names that shouldn't be filtered.
Should I file this as a bug with rpm or is this sufficient?
View 8 Replies
View Related
Mar 15, 2011
I'm taking a C programming class in college and we use VI text editor. I installed ubuntu on my computer so I can study. Every time I try to use Vi on my computer I'm able to type and delete using the delete button, but I can't delete using the backspace button. Every time I press it it only moves back on character. How can I solve my problem?
View 9 Replies
View Related
Sep 3, 2011
I'm a KDE fan, but I installed GNOME 3 to give it a test drive. I like some aspects, but I don't care for all the clutter in the menu, in the form of KDE apps that duplicate the functions of native GNOME apps. So I just opened alacarte and un-checked all those KDE apps. Simple, cleaned up the menu beautifully. Then I booted into my main environment, right-clicked on my launcher to open its editor and delete the GNOME apps. All of my KDE apps were gone!
Deleting GNOME apps from KDE works fine: They stay gone in KDE but they're still present in GNOME. The reverse is not true. Is there a better way than what I tried? Besides installing a GNOME distro in a vbox; I tried that and found it too sluggish. I could also replicate a menu structure on a dock (Cairo), but I thought I'd check with the experts first in case there's a less clunky approach.
View 9 Replies
View Related
Jan 15, 2011
I wonder how I can filter the syslog? i.e. there is a message that I don't want to see logged in there etc?
View 3 Replies
View Related
Apr 9, 2009
I am using Mailman to create a mailing list for my company. Our membership database is stored in a MS SQL 2000 server. I have figuired out how to write a batch script to export my email address into a text file.
The file is formatted as so:
Code:
Mailman sync_members scripts needs only email address. How can i use sed and/or awk to filter this file and leave me with just the addresses.
I need a file with each email address, 1 per line. Blank lines are ok.
View 3 Replies
View Related
Sep 6, 2011
Recently I setup a system for a non-technical user. He is only using Firefox, Pidgin and OpenOffice for about 2 hours a day. I have created a folder "/home/jim/myFiles" where he can save his document files. But Jim has accidentally deleted his myFiles folder on 2 occasions. He had intended to delete a file in that folder. Is there a way to lock the folder so that the user and create/read/write documents in that folder but not delete the folder itself?
View 14 Replies
View Related
May 25, 2010
I have the following structure:
/.svn
/bla/.svn
/hello/.svn
/bla/bla/bla/.svn
... etc
I want to delete all the .svn folders. How do I do it?It's NOT:
rm -rf .svn
In windows you use the /s trigger. How do you do it linux?
View 4 Replies
View Related
Jan 23, 2011
$ echo -e "AsometAhingA
somethingA
ASomethiAng"
AsometAhingA[code]....
I know that sed "s/A//" deletes the first match in every line.But i want to delete only the first match in a txt. like: sed -i "MAGIC" file.txt
View 3 Replies
View Related
Nov 30, 2010
we assume that we have 2 folders with the name 1 and 2 . The folder 2 is inside 1 . Also, in folder 2 we have file with name "file.txt". And we are in folder 1 . How can we delete the file.txt in one command line ? I mean without using the code below:
Code:
cd 2
rm -f file.txt
cd ..
View 3 Replies
View Related
Jul 29, 2010
How would I delete everything in a directory except for three specified directories?
So far I discovered I can omit the directories like so in a find search code...
View 6 Replies
View Related
Jul 8, 2010
I was having huge problems with PHYO using 100%CPU when I had Ubuntu 10 loaded, now I have down graded back to 9.10. the problem was rectified, but it has returned, never had this problem before with earlier versions.Even when the pc is idle phyo is using all of the cpu at 100%, not as damaging as the last version of ubuntu but still occurs.
View 5 Replies
View Related
Feb 22, 2010
What is Clientmqueue?How to Delete clientmqueue. Is it possible?
View 7 Replies
View Related
Jun 30, 2011
Code:
[root@station3 ~]# seq 10 | sed -e '1,2d' -e '1,2d'
4
5
6
7
8
9
10
We can see that sed just deletes the first three lines. How "seq 10 | sed -e '1,2d' -e '1,2d'"works?
View 1 Replies
View Related
Apr 28, 2011
I have open ports on my computer for vsftpd, pptpd, and I need help to filter this ports because they aper as open ports on internet, and this is pretty risky
View 3 Replies
View Related
May 15, 2011
I want to install l7-filter application on my opensuse 11.3 . I couldn't install it alone according to this guide :
Layer 7 Userspace HOWTO
the download link is :
Linux layer 7 packet classifier - Browse Files at SourceForge.net
View 1 Replies
View Related
Sep 8, 2010
I want to backup my installed packages using this method mentioned in thread [URL] but the problem is I have 31 broken parkages, i want a way to know the broken parkages so I would remove them in my repack so when i restore the parkages I wont have broken parkages. For now i cant fix them as I dont have internet....
View 5 Replies
View Related