Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > System > Shells

    d command 5.4

    Download button

    Downloads: 612  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.4/5)
    14 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Dave Yost | More programs
    Freely Distributable / FREE
    December 30th, 2006, 07:35 GMT
    ROOT / System / Shells

     Read user reviews (0)  Refer to a friend  Subscribe

    d command description

    d command runs a command in the background and redirects its output to a file.

    The d command runs a command in the background and redirects its output to a file. The output file is annotated with start and end time, the actual command used, cwd, host, etc.

    You can ask the d command to extract the last command from the output file and run it again, you can ask it to append to the file or not, and other goodies.

    It comes with handy little programs to look at the output, tail it, etc. d command is sort of trivial, but has been streamlined over many years.

    Usage: d [ -f file ] c[n][a][p] cmd arg ...
    or: d [ -f file ] m[n][a][p] [ make_arg ... ]
    or: d [ -f file ] s[n][a][p] [ additional_arg ... ]
    or: d [ -f file ] h

    Do a task in the background, with its stdout and stderr redirected to a file called out or to file or to a file named by a $yostD_OUTFILE environment variable. The d command usually does

    mv ,out out

    and then creates a new out file, but d can be told to append to out instead.

    The task argument is composed of individual letters:

    One of these is required:

    c Do the following command - redirection and piping work if quoted.
    m Do a make.
    s Do the same command again (extract the last command from out, and run it again (without 'nice' unless you ask for it again).
    h Print a history of what happened in this out file.
    These are optional:
    n Do it nicely.
    a Append to out.
    p Just print the command that would be executed; don't run it.

    The d command comes along with several helper shell functions:

    q tail -f out
    qq cat out
    qt tail -20 out
    cq clear ; q
    cqq clear ; qq
    wq wait "$@" ; printf "b" ; qq
    wqt wait "$@" ; printf "b" ; qt

    The output from d into the file out consists of

    prologue
    output from the command
    epilogue

    as shown in the example below, which does this:

    Run a command (c) in the background, with output to the out file.

    Run the same (s) comand again, with nice (n), appending (a) the output to the existing out file.

    Show the out file.

    Show what will happen (p) if we try to run the same command again, using ‘d s’.

    Show the history (h) of commands and results contained in the out file.

    What's New in This Release:

    · The script was fixed so that in addition to zsh, it also works with bash, ksh, and sh.



    Product's homepage

      


    TAGS:

    outoput redirect | cwd command | host command | d | command | outoput

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM