Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-03-2015, 04:09 AM
|
#1
|
LQ Newbie
Registered: Apr 2010
Posts: 4
Rep:
|
the use of the & sign in the ifconfig commad
I found this script (part presented here) in the /etc/cron.hourly directory.
ifconfig $i up& (the $i in the do loop is either, lo (loopback), eth0 or eth1).
I know this turns the connection "on", but what effect is the & sign?
|
|
|
04-03-2015, 04:13 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,364
|
& will put the process in the background, that means the cron will not wait for it any more.
|
|
|
04-03-2015, 07:59 AM
|
#3
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,956
|
Exactly what pan64 said.
But what does the script do next? Does it expect to use the network it just raised up? Because it may not yet be up, or never be up if circumstances do not allow. So the script is not blocked, but hopefully the script is checking status to determine if the network has connected.
|
|
|
04-03-2015, 11:27 PM
|
#4
|
LQ Newbie
Registered: Apr 2010
Posts: 4
Original Poster
Rep:
|
agreed with you all...
I forgot about the background use of the &. Amazing how things get loss in the mind.
the command is part of a virus I found. IN "hourly" the Ethernet is raised along with local loop.
IN "cron.minute", multiple messages are sent every second, the overload shuts things down.
I was wondering why cron on Linux has these monthly, weekly and hour directories rather than the just the crontabs in the original unix systems? What would happen if they (month, week, etc,) were removed? or just remove the place holder.
|
|
1 members found this post helpful.
|
04-04-2015, 12:19 AM
|
#5
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,367
|
Quote:
Originally Posted by tecsoftware
the command is part of a virus I found. IN "hourly" the Ethernet is raised along with local loop.
IN "cron.minute", multiple messages are sent every second, the overload shuts things down.
I was wondering why cron on Linux has these monthly, weekly and hour directories rather than the just the crontabs in the original unix systems? What would happen if they (month, week, etc,) were removed? or just remove the place holder.
|
Well, that does not sound like a "virus", but just like a compomised system being exploited as a spam bot.
You really need to remove that system from network visibility immediately and fix whatever is going on with it.
Cron is really just cron... the hourly, daily and monthly are just convenience scripts that you can use to run jobs according to your own needs. It isn't so much a Linux thing as just some default choices made by the distro, which you should always reconfigure to suite your actual requirements.
|
|
|
All times are GMT -5. The time now is 03:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|