1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SSH LS command output to file.

Discussion in 'Site & Server Administration' started by SGBoise, Mar 6, 2009.

  1. #1
    Hey Guys

    I need to output a list of files in a directory to a file. How is this possible with linux?

    Similar to dos dir > output.txt
     
    SGBoise, Mar 6, 2009 IP
  2. addietama

    addietama Peon

    Messages:
    144
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ls > file.txt (it will overwrite the file.txt every time executed)
    ls >> file.txt (it will append the file.txt every time executed)

    hope it'll help..
     
    addietama, Mar 6, 2009 IP
    SGBoise and Camay123 like this.
  3. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Good call. + rep for you.
     
    Camay123, Mar 6, 2009 IP
    SGBoise likes this.
  4. SGBoise

    SGBoise Peon

    Messages:
    647
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks. rep for both of you. :)
     
    SGBoise, Mar 6, 2009 IP