Find the answer to your Linux question:
Results 1 to 4 of 4
how would i get the output on screen to dump to a file w/o interacting w/ the prog? i use bdc and need to have a list of files it ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    90

    redirect screen output?

    how would i get the output on screen to dump to a file w/o interacting w/ the prog?

    i use bdc and need to have a list of files it misses, i get 'update failed' all the time.
    this is kinda what appears, but not real output:

    bdc --arc --delete --moves /mnt/$whatever/

    i get:
    /mnt/$whatever/infected file.exe >> infected: $virusname
    /mnt/$whatever/infected file.exe >> deleted
    /mnt/$whatever/infected file.exe >> update failed

    when you got this 90000 times, it gets kinda old to have to keep scanning and searching the results, which go offscreen.
    i wish i knew how to get it to see the FILENAMES and store them and go back and kill them, but just having a list helps. any ideas?

  2. #2
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,047
    Have you tried

    command bla bla >> logfile

    This saves the output to 'logfile'

    Or you could of course do:

    command bla bla | lpr
    (sends output to the printer)

  3. #3
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by jwmw1023 View Post
    how would i get the output on screen to dump to a file w/o interacting w/ the prog?

    i use bdc and need to have a list of files it misses, i get 'update failed' all the time.
    this is kinda what appears, but not real output:

    bdc --arc --delete --moves /mnt/$whatever/

    i get:
    /mnt/$whatever/infected file.exe >> infected: $virusname
    /mnt/$whatever/infected file.exe >> deleted
    /mnt/$whatever/infected file.exe >> update failed

    when you got this 90000 times, it gets kinda old to have to keep scanning and searching the results, which go offscreen.
    i wish i knew how to get it to see the FILENAMES and store them and go back and kill them, but just having a list helps. any ideas?
    If you want to review the output later you can just use >:

    Code:
    command parameter > logfile
    Any output from "command" will be redirected to a file named "logfile". If you just want the messages to go away entirely (and don't need to review them later you can redirect to null:

    Code:
    command parameter > /dev/null
    This has essentially the same effect as telling the program to run in "silent" mode, since all messages are redirected into nothing, thus they just disappear.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  4. #4
    Just Joined!
    Join Date
    Nov 2006
    Posts
    90
    that simple? damn! bash scripting seems so hard @ first, but after awhile on forums...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...