Save Grep To Txt File
Jan 28, 2008I grepped an IP address on a domain log and it showed thousands of lines. How do I save this grep result to a txt file so I can send it to someone?
View 4 RepliesI grepped an IP address on a domain log and it showed thousands of lines. How do I save this grep result to a txt file so I can send it to someone?
View 4 Replieshow can i save /etc/passwd there is many linux order which show my users on server
such as :
cat /etc/passwd
cat /var/cpanel/acounting.log
ls -la /etc/valiases
ls /var/named
-----------------
and how can i disable the geting orders
such as :
wget
curl -o
lynx
Display some text in a web browser from a file called text.txt
text.txt will have many lines and some of them I do not want users to be able to modify and overwrite.
config_item_1=user can edit
config_item_2=user should see but not edit (could be on any line)
config_item_3=user can edit
config_item_4=user can edit
The user has made their changes in the web browser and clicks submit. I then need this info to be saved as the text.txt file however some checking needs to be done first. Anything matching config_item_2 should be removed. This could be on any line. Anything not matching should be permitted and added.
i use the following perl script(created by me) to save server load every 30 minutes to a log file i just keep it running in the background(probably would be more effective using cron)
#!/usr/bin/perl
while(1) {
$w = `w`;
#print $w;
$w =~ /load average: (.+)
/;
$log = $1;
my ($sec, $min, $hour, $mday, $mon, $year) = localtime;
my $rightnow = sprintf("%04d-%02d-%02d %02d:%02d:%02d ", $year + 1900, $mon + 1, $mday, $hour, $min, $sec);
$log = $rightnow . ": " . $log ."
";
open (OUTFILE, ">>top_logfile.txt");
print OUTFILE "$log
";
close (OUTFILE);
#sleep for 30 minutes
sleep(1800);
}
If I try to download a plesk backup to my local machine it saves a file a few bytes in size in .xml.tar.html format
My other non plesk 12 machines correctly save the file in .tar format ....
I am trying to run a script that will locate the process number and will change the iowait priority
This will display the process number :
ps -ef |grep rsync|grep -v grep | awk '{print $2}'
ionice runs like this:
ionice -c3 -p <process number>
Any way to combine these to change iowait priority of a process?
Having some trouble using grep and hoped someone might be able to help.
Running the following command to try and scan for an IP address match across a period of time in our access_logs:
grep '04/Feb/2007:21:*:*' /var/www/vhosts/*/statistics/logs/access_log.processed | grep
'216.2*.*.*'
This is returning all kinds of IP address results such as: 58.216.50.2 Can you suggest how I can tweak the grep command to search for the right IP addresses?
I want to scan precisely for IP addresses starting 216.2*.
We've been given the following information about spam, and want to track the source of it
down:
216.2x.x.x - email spam
So any ideas how I can scan these logfiles more precisely for the IP address I need?
I have installed HotSaNIC and I get no output when I do a
cat /proc/stat |grep disk_io
I have also tried
grep disk_io /proc/stat
and still no response, is any one able to help or suggest anything..
I am using RH E 5.1 ..
What does this string do? I copy and paste it into my SSH Shell and i get ip addresses and numbers next to them.
Each number means one connection?
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
As root I can't save any changes inside my.cnf. Allways getting this error:
Could not open file for writing: Permission denied
I checked file permissions twice - everything seems to be normal.
In my dedicated server I have MS SQL 2005 Server whose backup is scheduled at night 2:00 am through Management Console. Now, once the backup is over I wish compress it and give the current date as the name to the compressed file.
I had tried to do it using PK Zip server but was not successful in doing so. Can any body help me in accomplishing this.
My site is going down lot of times due to high cpu quota and when i check cpu exceeded logs i could see some ip addresses trying to open non existenet permalinks i.e. my site is smartdesis.com and they try to open smartdesis.com/xxx which gives a 404 error which is causinf high cpu usage. Repetedly they are trying to open differnt urls by appending /xxx to them, i banned nearly 100 ips but they seem to be growing.
View 10 Replies View RelatedI switched from Resellerzoom to wiredtree with a vps. I also have accounts with liquidweb and softlayer. All are reliable and uptimenot an issue but as far as getting help Wiredtree is just far above.
I have been there now only a few months but so far so good. If your not a real tech person wiredtree is your best bet. ANd the email response time wow!! I tried to call them once but by time I picked up the phone and waiting on hold for about 2 minutes my email was already responded to.
I am sure there are thousands of good host out there but I know on this boards when i looked no one would tell me whichto go with , they all said it depends on this and that. What I am saying is if your looking for a good VPS and your not a technical person go with Wiredtree save yourself the headache I had with others that are great host but just not ready to deal with us stupid people who dont know how to "harden" a server .
for save my server from perl shells , many hakers can haked by cgi-telnet & r57 shell with perl how can save perl without stop it because if i stop it cpanels was disabled any one have any way to save my server from shell perl?
View 11 Replies View Relatedi use for login to ssh by putty
and i run very command and result
how may i saved all this command and result in putty?
Panel-Version11.5.30 Update #38
BSDebian 7.4
Save Web Hosting Settings takes a long time. The Domains (Apache Server) are not reachable for 36 seconds.
I want to save the access logs of our websites on an external server. If I do this now with the default setup, the gets overwritten every day. The desired file name format whould be: websitedomain-tld-access-2014-10-24.log
How can I tell Plesk to do this and how can I make sure the statistics keep working?
On our other servers we use rotatelogs for this.
I'm build Plesk Panel for Linux and Presence Builder, I don't want my user can upload their website to hosting via File Manager. How can I do it...
View 2 Replies View RelatedSay I have 2 websites and they all use file.php which is located on mainserver.com/file.php.
I want to use the file like this:
website1.com/file.php
website2.com/file.php
I've got a 256mb cpanel vps and since I use enom's dns for all the domains going to the server, could I actually disable named (Berkely Name Server Daemon BIND) and get back 64mb ?
View 5 Replies View RelatedRapidly growing error logs showing the same message
$ug-non-zts-20020429/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20020429//usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
root@server [~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20020429
./ ../ eaccelerator.so*
root@server [~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20020429
./ ../ eaccelerator.so*
Using cpanel 11 / centos 4
i have a server with centos,
i need to edit the hidden file .htaccess from the file management tool of cpanel,
but the hidden files not shown,
ow can i modify the setting and let the files shown in the file management tool of cpanel?
How can we stop Plesk resetting the file permissions on a dll file that is found in
C:Program Files (x86)
??
Specifically,
we have a file, jmail.dll,
here
C:Program Files (x86)Dimacw3JMail
By default Plesk permissions are set to DENY for PSACLN.
But the JMail plugin cannot work with these permissions !
We change this to be ALLOW for READ & EXECUTE and DENY for WRITE.
And everything works fine.
But every time Plesk does an update it reverts it back !
This means that a number of our customers contact forms stop working !
I'm trying to do this
/usr/bin/gzip -p /home/mysite/public_html/shop/feeds/myfile.xml.zip > /home/mysite/public_html/shop/feeds/myfile.xml
But it just tells me
/usr/bin/gzip: invalid option -- p
X-Powered-By: PHP/5.2.5
Content-type: text/html
How do I find the correct option to unzip first file to second file?
i manage linux apache webserver with a few wordpress blogs and from time to time i see someone inject a malicious .php file into wp-content/uploads/2014/10/ directory.
i think its some bad plugin or theme, but these is more blogs, i ugrade, update, WP, but
how can i setup some monitor to tell me which php file (or even line in php file) injected that malicious .php ? I have linux root access so i can setup anything
Today I found some cstomer on the servers make a link for named it file.txt and link it to other customer php file.
so that customer have the ability to show the other custoer file content when visiting the url because it is a text wile originally it is a php file.
the php file was a config file, so now he know the database password , and because he is in the same server he can use that databse.
the question , how to avoide this prolem in the future?
notes , the SuExec is rnning and the open_basedir protection is enabled, but the problem still exists.