Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using Ubuntu 10.10.

I am generally good with computers but mostly with Windows, I'm not very familiar with Ubuntu. I'm trying to setup a website and I'm talking with a friend I have who works for a school IT department who is giving me advice.

He told me that I need to open a command-prompt and type in sudo /etc/init.d/apache2 start but when I do all I see is sudo: /etc/init.d/apache2: command not found.

I told my friend the error and he said that my file /dev/null was full, so I tried to find it but it's a hidden file. I know how to view hidden files in Windows but not in Ubuntu.

My friend is offline now so I'm hoping someone can tell me how to delete my /dev/null? Thanks!

share|improve this question

closed as off topic by Zoredache, MikeyB, pehrs, Chris S, Zypher Feb 7 '11 at 19:36

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

39  
Is your "friend" really a friend? –  jscott Feb 7 '11 at 15:44
15  
Apparently your friend does not want to answer your questions. Use ServerFault instead. –  C. Ross Feb 7 '11 at 15:48
10  
With friends like that, who needs enemies? Also try sudo service apache2 start or sudo service httpd start to start Apache instead of calling the init.d script directly. –  Ian C. Feb 7 '11 at 15:51
4  
To verify that /dev/null is empty: wc /dev/null. You should get all zeros (which is coincidentally the amount of attention you should pay to what your "friend" says). To empty /dev/null: cat /dev/null /dev/null [ OK, just kidding about that last one. ;) ] –  Dennis Williamson Feb 7 '11 at 15:53
2  
+1 to everyone for not laughing audibly until after giving the OP a straight answer. We've all been there at some point. –  AndyN Feb 7 '11 at 18:19

5 Answers 5

up vote 40 down vote accepted

It's not possible to empty /dev/null, that doesn't make sense. Your friend is joking with you.

However it sounds like you don't have apache2 installed. You should be able to install it with sudo aptitude install apache2

share|improve this answer
13  
+1 - "The bit bucket is full. Please empty it and press any key to continue." –  Evan Anderson Feb 7 '11 at 15:44
2  
Ahh I get it now, thanks (I googled /dev/null). I'm following a tutorial now to install "Apache", thanks for the help guys (sorry I can't upvote or accept all the correct answers)! –  Jason Merandez Feb 7 '11 at 15:59
1  
@Jason I've done that by accident. When I rebooted, nothing came up...it's surprising how much startup scripts depend on the existence of /dev/null. –  barrycarter Feb 7 '11 at 18:40
1  
If you want to cover your tracks you can create custom 'null' objects and dump logs to them... kinda like a black hole. –  Jason B Shrout Feb 8 '11 at 0:02

Whilst I agree with all the other posters, that in this case your friend is messing with you, I have had a system where /dev/null filled up.

Somehow, /dev/null got deleted, and the next time someone did

verbose-command > /dev/null

it completely filled up the root partition with a single, large file called /dev/null, and the command stalled because it could no longer write to /dev/null. We found no more efficient way to describe this than "/dev/null filled up".

I must stress that I don't think that's your problem, in this case. The explanation about not having the apache2 package installed is much more likely! And under no circumstances should you delete /dev/null, its presence is necessary for sane system operation.

share|improve this answer
    
Well, technically /dev/null didn't fill up since it wasn't a virtual file, but I guess it fits ;-) –  Bart Silverstrim Feb 7 '11 at 15:53

In the Air Force, newbies are sent to retrieve a gallon of prop-wash or 50 yards of flight line. I guess this the sys-op equivalent. Your friend is just having some fun at your expense.

share|improve this answer
    
You still use props or does it count coming from helicopter rotors too? –  Bart Silverstrim Feb 7 '11 at 19:35
3  
@Bart rotor-wash is more concentrated -- you typically only need a half-gallon :) –  voretaq7 Feb 7 '11 at 19:41

First thing you should do is to stop listening to your friend. Seriously, that advice he gave you makes absolutely no sense. The '/dev/null' isnt a file, it cant get full, its a special device node that your system uses for various purposes.

Your command is likely failing because apache is not installed. Try installing it first and see if you have any better results.

share|improve this answer
8  
It makes perfect sense as an answer if you're messing with someone who obviously doesn't know Linux and they want to make him look silly and embarrass him. –  Bart Silverstrim Feb 7 '11 at 15:52

Look up the definition of "null" and you'll have reason to hit your friend with a "cluebat" for messing with you.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.