Jump to content

ls command help

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
BigLinux

BigLinux

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
Is there a way to set the "ls" command not to output the result of the command "ls" unless the directory exists? So if a directory does not exist it will not output that the directory does not exit.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Can you give an example, I'm not sure what you mean. Also, have you typed "man ls"? There are a LOT of options for that command.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
BigLinux

BigLinux

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
Yes I did... but I did not find a way to do that.. and as for explanation I want that when i type in ls, if the folder does not exist.. I don't want it to output an error.. it just won't say anything.. but if the folder does exist.. I want it to output the result

#4
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Very nice! Simple and I like the colors. You should get a bot to grab some free content unless your aiming for unique content.

#5
BigLinux

BigLinux

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
I think you posted in the wrong thread..

#6
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
heh sorry...

#7
BigLinux

BigLinux

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
No problem :)

So.. any help on fixing this?

#8
Showstopper

Showstopper

    Programmer

  • Members
  • PipPipPipPip
  • 171 posts
What is wrong with seeing the error? I dont know of a way to do that.

#9
BigLinux

BigLinux

    Learning Programmer

  • Members
  • PipPipPip
  • 46 posts
Well, I want to do a script and I'd like to eliminate that error