Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-12-2011, 11:37 AM   #1 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default What is the /dev/null directory?

Is this a temporary path, or will I be saving to the device permanently if I use this as my path? If i'm saving to the device permanently, how would I go about saving say - an audio file recorded with AVAudioRecorder - temporarily so that when I finish recording, I don't have an audio file saved to the device taking up space?
Whitehk is offline   Reply With Quote
Old 06-12-2011, 11:47 AM   #2 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

That's a pretty poor trolling attempt in all fairness......

Go ahead and save to /dev/null, it won't take up space
sneaky is offline   Reply With Quote
Old 06-12-2011, 11:51 AM   #3 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default

Quote:
Originally Posted by sneaky View Post
That's a pretty poor trolling attempt in all fairness......

Go ahead and save to /dev/null, it won't take up space
Haha. Didn't even know that was trolling. I guess you could say I'm not "with it" in internet lingo. Anyways, thanks.
Whitehk is offline   Reply With Quote
Old 06-12-2011, 12:24 PM   #4 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Trying to Google /dev/null didn't occur to you? There's even a Wikipedia article on it.
baja_yu is offline   Reply With Quote
Old 06-12-2011, 12:27 PM   #5 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
Trying to Google /dev/null didn't occur to you? There's even a Wikipedia article on it.
Yes, actually it did. Did it. Couldn't find anything. Came here. Got a quick simple answer. I'm not an idiot. It's because of answers like this I hesitate to actually use this forum.
Whitehk is offline   Reply With Quote
Old 06-12-2011, 12:54 PM   #6 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Well, the first result when Googling "/dev/null" is: /dev/null - Wikipedia, the free encyclopedia ... So I'm not sure either what you searched for, or why you consider that Wiki article to not be "anything".

Also, what is the "quick and simple" answer you got here?
baja_yu is offline   Reply With Quote
Old 06-12-2011, 12:56 PM   #7 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
Well, the first result when Googling "/dev/null" is: /dev/null - Wikipedia, the free encyclopedia ... So I'm not sure either what you searched for, or why you consider that Wiki article to not be "anything".

Also, what is the "quick and simple" answer you got here?
Quote:
Originally Posted by sneaky View Post
That's a pretty poor trolling attempt in all fairness......

Go ahead and save to /dev/null, it won't take up space
Sneaky's answer...
Whitehk is offline   Reply With Quote
Old 06-12-2011, 12:58 PM   #8 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

So how is his answer, calling you a troll and telling you to save files to null device (which basically destroys/discards any data passed to it) somehow a good answer, and me telling you to look at the Wikipedia article which very clearly explains what the null device is and how it is used, is somehow an insult to you and a reason why you hesitate to post on the forum?!
baja_yu is offline   Reply With Quote
Old 06-12-2011, 01:33 PM   #9 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
So how is his answer, calling you a troll and telling you to save files to null device (which basically destroys/discards any data passed to it) somehow a good answer, and me telling you to look at the Wikipedia article which very clearly explains what the null device is and how it is used, is somehow an insult to you and a reason why you hesitate to post on the forum?!
I was asking whether or not /dev/null was a temporary directory. He told me that it would not take up space if I saved there. This is what I wanted to know, and it was answered. Simple to the point answer. I'm not saying your answer was a bad one. I just take offense to people that have to belittle others by saying did Google occur to you.
Whitehk is offline   Reply With Quote
Old 06-12-2011, 01:43 PM   #10 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

It seems that you neither understood my last post, nor attempted to read the Wikipedia article. The null device is not a temporary folder. You can't "save" anything to it. Whatever data you send it will be discarded immediately. He was making fun when he said "it wont take up any space". It wont, because you'll lose the data right away.
baja_yu is offline   Reply With Quote
Old 06-12-2011, 02:37 PM   #11 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

Quote:
Originally Posted by Whitehk View Post
I was asking whether or not /dev/null was a temporary directory. He told me that it would not take up space if I saved there. This is what I wanted to know, and it was answered. Simple to the point answer. I'm not saying your answer was a bad one. I just take offense to people that have to belittle others by saying did Google occur to you.
I think he was just giving you a heads up warning, since you didn't seem to understand the meaning of the original answer.

And /dev/null isn't internet lingo (well, I expect it probably is, but that's not its origin). It's a Unix thing. No one would ever write code to write to /dev/null. Its only use is to redirect output you don't care about from other tools so that it won't flood your console, or so it won't write an actual disk file that you aren't planning on ever looking at anyway.

(Also, if you've already googled something and either came up dry or just got results that didn't make any sense to you, it's always good to say that up front, to avoid getting the otherwise reasonable response "did you try googling?", or "did you check the docs?". Both of which can be and often are stated in much shorter, less friendly, acronyms.)
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 06-13-2011, 02:23 AM   #12 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

Um,
So /dev/null is pretty infamous in the unix file system and it's generally safe to assume that if you have heard of /dev/null you know what it is. Hence the Trolling remark. I really thought that you were pulling a prank.

Sticking /dev/null into google will give us the wikipedia article starting with
Quote:
In Unix-like operating systems, /dev/null or the null device is a special file that discards all data written to it (but reports that the write operation succeeded) and provides no data to any process that reads from it (yielding EOF immediately).[1]

In programmer jargon, especially Unix jargon, it may also be called the bit bucket[2] or black hole.
So, yea, it is common to save to /dev/null, it will not take up any disk space. The retrieval of the *saved* data can be very tricky though.

So where did you hear about /dev/null and what did you hear about it?
sneaky is offline   Reply With Quote
Reply

Bookmarks

Tags
/dev/null, avaudiorecorder, directory, file management, file system

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 316
6 members and 310 guests
chemistry, Dnnake, iOS.Lover, lendo, Leslie80, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:22 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0