Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: nimafire
7,458
Posted By sea
Hello Try: LOG=/path/to/logfile TOTAL=0 ...
Hello

Try:
LOG=/path/to/logfile
TOTAL=0

grep Virus "$LOG" | while read _ _ NUM
do
TOTAL=$(( $TOTAL + $NUM ))
done

echo $TOTAL Viruses found

If that doesnt help, how about show...
5,047
Posted By jim mcnamara
If the file names are the basis of comparison: ...
If the file names are the basis of comparison:

diff -r dir1 dir2 | grep dir1 | awk '{print $4}' > ~/mydiff

diff -r does a recursive comparison of directories and their subdirectories
Forum: Cybersecurity 08-25-2019
5,787
Posted By Neo
If you are being attacked or infected by malware...
If you are being attacked or infected by malware which uses chattr, I suggest you create a wrapper around (or replace) chattr and log the events.

For example, I once was tracking malware which...
1,704
Posted By RudiC
Try awk ' ...
Try
awk '
{split ($0, IP, "/")
printf "internal=yes\ninternalip=%s\ninternal.dest:%s port=%s\n", IP[1],...
4,749
Posted By Corona688
why not just wget http://url1 http://url2 instead...
why not just wget http://url1 http://url2 instead of running wget twice?

Also, if the page redirects to an error page instead of giving a proper 404, wget will not detect an error.
11,959
Posted By junior-helper
Try this corrected version, which is based on...
Try this corrected version, which is based on your own attempts:
ls /home > /root/Desktop/userslist

#empty LIST file
>/root/Desktop/LIST

for i in `cat /root/Desktop/userslist`
do
...
11,959
Posted By RavinderSingh13
Hello Nimafire, You can try with following...
Hello Nimafire,

You can try with following command.

While user creation you can use following command.

useradd -e `date -d "60 days" +"%Y-%m-%d"` someuser


To change user's expiration...
949
Posted By pilnet101
You can create an alias. To do this you can...
You can create an alias.

To do this you can use the below command:
alias up='/path/to/the/script.sh'

Then whenever you enter command 'up' (you can change this but I used up to stand for...
949
Posted By Scrutinizer
You can make it executable ( chmod +x...
You can make it executable ( chmod +x /path/to/script ) and make sure /path/to is in the PATH variable
949
Posted By junior-helper
Yes. Check if a folder called bin exists in your...
Yes. Check if a folder called bin exists in your home directory ls ~/bin

If yes, copy/move your script there and ensure it is executable (chmod +x script)

If ~/bin existed before, you should...
726
Posted By sea
RC=$? sets the variable RC, which is a synonym...
RC=$? sets the variable RC, which is a synonym for Return Code, to exactly this, others use 'RET', 'ret', 'return_code' or something alike.
$? contains the return code of the previously executed...
2,220
Posted By gacanepa
I insist that checking the existence of a file is...
I insist that checking the existence of a file is not the best way to allow or deny its execution.
What I would do is wget the file, then if that command completed successfully I'd start the...
1,179
Posted By Jotne
And if your terminal support 256 colors, try this...
And if your terminal support 256 colors, try this script:
#!/bin/bash
#
# generates an 8 bit color table (256 colors) for reference,
# using the ANSI CSI+SGR \e[48;5;${val}m for background and
#...
1,179
Posted By ahamed101
Colours...
Colours (http://www.bashguru.com/2010/01/shell-colors-colorizing-shell-scripts.html)

--ahamed
1,129
Posted By zaxxon
If it is working, it's just what you asked your...
If it is working, it's just what you asked your friend for.
Why don't you ask your friend? :)

Next time, be more precise which part you do not understand instead, thanks.


#!/bin/bash

Use...
786
Posted By Aia
That's what sed does best. sed...
That's what sed does best.
sed 's/#send_value=0/send_value=1/' foo > bar && mv bar foo
Forum: Cybersecurity 08-04-2013
1,519
Posted By unSpawn
On systems that support MAC you may be able to...
On systems that support MAC you may be able to modify a policy to deny writes to files, denying policy alteration and denying reboot (convoluted). On file systems that support it you can set the...
Forum: IP Networking 08-04-2013
1,365
Posted By Just Ice
that could work as long as the other devices are...
that could work as long as the other devices are on the same subnet as the centos dhcp server ... as for dhcp, configuration -- see man dhcpd ...
1,634
Posted By cfajohnson
tab=$'\t' read num grep "^$num$tab" | cut...
tab=$'\t'
read num
grep "^$num$tab" | cut -f2-
63,819
Posted By jim mcnamara
ITs www.unix.com 1 bit = 1 vbCredit- a feature for...
ITs www.unix.com 1 bit = 1 vbCredit- a feature for vbulletin forums.

www.unix.com - Ultimate Points System - vBulletin.org Forum (http://www.vbulletin.org/forum/showthread.php?t=172399).
Showing results 1 to 20 of 20

 

Featured Tech Videos

All times are GMT -4. The time now is 08:02 AM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy