What does ls /nosuchdir means ??? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  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 Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 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 02-05-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 26 August 2014, 2:14 PM EDT
Location: Out running a Marathon.
Posts: 2,322
Thanks: 71
Thanked 153 Times in 142 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 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 02-05-2008
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 29 August 2014, 4:17 PM EDT
Location: Foxborough, MA
Posts: 7,644
Thanks: 150
Thanked 577 Times in 542 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 02-05-2008
Dave Miller's Avatar
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 02-05-2008
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 29 August 2014, 4:17 PM EDT
Location: Foxborough, MA
Posts: 7,644
Thanks: 150
Thanked 577 Times in 542 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 02-05-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 26 August 2014, 2:14 PM EDT
Location: Out running a Marathon.
Posts: 2,322
Thanks: 71
Thanked 153 Times in 142 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 Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:15 AM.