Unix/Linux Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

What does ls /nosuchdir means ???

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-05-2008
risshanth risshanth is offline
Registered User
 
Join Date: Oct 2007
Last Activity: 27 November 2012, 11:52 AM EST
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
What does ls /nosuchdir means ???

I do have a segment in my code like follows:

if [ condition ] then
ls /nosuchdir
fi


what does the ls /nosuchdir means ??
Sponsored Links
    #2  
Old Unix and Linux 02-05-2008
joeyg's Unix or Linux Image
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 16 April 2015, 10:54 AM EDT
Location: Within two miles of a Dunkin donuts.
Posts: 2,351
Thanks: 80
Thanked 160 Times in 147 Posts
provide listing of files

The ls /nosuchdir command will give a listing of files in the /nosuchdir directory. Beware, since the directory is preceded by the / means that you are looking to the root of your system and not referencing from where you are currently.
Sponsored Links
    #3  
Old Unix and Linux 02-05-2008
risshanth risshanth is offline
Registered User
 
Join Date: Oct 2007
Last Activity: 27 November 2012, 11:52 AM EST
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Hi joeyg

I doubt whether you are aware /nosuchdir ...
"nosuchdir" is not a directory .. Its a concept in shell scripting..

So please let me know that...
    #4  
Old Unix and Linux 02-05-2008
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is online now Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 19 April 2015, 5:22 AM EDT
Location: Foxborough, MA
Posts: 7,804
Thanks: 172
Thanked 647 Times in 605 Posts
Quote:
Originally Posted by risshanth View Post
I doubt whether you are aware /nosuchdir ...
"nosuchdir" is not a directory .. Its a concept in shell scripting..

So please let me know that...
hmmm... what 'concept' is that?
Sponsored Links
    #5  
Old Unix and Linux 02-05-2008
Dave Miller's Unix or Linux Image
Dave Miller Dave Miller is offline
Registered User
 
Join Date: Dec 2007
Last Activity: 5 October 2010, 9:10 AM EDT
Location: Northern NJ, USA
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
Here's a shot in the dark:

Since the file doesn't exist, the 'concept' is a quick and easy method of producing output that also affects the error flags.
Sponsored Links
    #6  
Old Unix and Linux 02-05-2008
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is online now Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 19 April 2015, 5:22 AM EDT
Location: Foxborough, MA
Posts: 7,804
Thanks: 172
Thanked 647 Times in 605 Posts
Quote:
Originally Posted by Dave Miller View Post
Here's a shot in the dark:

Since the file doesn't exist, the 'concept' is a quick and easy method of producing output that also affects the error flags.
I'm not sure I can 'parse' what's being said here!
Could you elaborate, pls?!
Sponsored Links
    #7  
Old Unix and Linux 02-05-2008
joeyg's Unix or Linux Image
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 16 April 2015, 10:54 AM EDT
Location: Within two miles of a Dunkin donuts.
Posts: 2,351
Thanks: 80
Thanked 160 Times in 147 Posts
Bug Is this some kind of trick question?

Check for a condition
If the condition is true
Then list files in the directory

Perhaps the vagueness, or "conceptualness", is confusing people

Provide actual script code
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
!! what is this means vasuarjula Shell Programming and Scripting 4 04-28-2009 03:02 AM
$$ means? patiobarbecue Shell Programming and Scripting 4 12-12-2008 12:40 PM
Can anyone tell me what this means..??? samarn UNIX for Dummies Questions & Answers 1 11-23-2008 07:46 AM
$? means? mathur UNIX for Dummies Questions & Answers 2 11-03-2008 06:36 AM



All times are GMT -4. The time now is 05:27 AM.