Linux: nohup without output

Posted on 2011-10-12
Last Modified: 2012-05-12
This  returns output like this: "[1] 23936"
nohup doSomething >/dev/null &

Open in new window

How can I do this without any output?
Question by:hankknight
    LVL 9

    Expert Comment

    The usage of  & symbol causes this job to run in background which causes the program to return the PID assigned to it

    change the command to
    nohup doSomething >/dev/null & > /dev/null

    an try.

    hope this helps!
    LVL 16

    Author Comment

    That does not work.  Try it:
    nohup ls >/dev/null & > /dev/null

    Open in new window

    LVL 9

    Assisted Solution

    I only get a message nohup: ignoring input and appending output to 'nohup.out'

    I tried
    1. nohup ls -lR & > /dev/null
    2. nohup ls -lR > /dev/null & > /dev/null

    LVL 30

    Accepted Solution


    The output comes from the OS not the command because "&" causes the command to be executed in background. One way to avoid this is to run it from within another shell such as:

    bash -c "nohup doSomething &" > /dev/null


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now