Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2004
    Location
    Israel
    Posts
    61

    can i pause the command execution


    i started
    Code:
    find /
    now it goes throw all of my hard drives can i somehow using my keyboard "pause" the command while it executes & then return later and continue it without starting the search all over again ?

  2. #2
    Just Joined!
    Join Date
    Jun 2004
    Location
    root@ur_box$
    Posts
    15
    Um. "find /" isn't going to do much of anything. However, you can redirect the output to a file. You need to figure out how to use find first.

  3. #3
    Just Joined!
    Join Date
    May 2004
    Location
    Pennsylvania
    Posts
    98
    yes. You can pause a job and resume it later.

    ctrl-z to pause.

    this creates a "stopped" job.
    You can then use %jobnumber to resume.

    you can use the command

    jobs

    to list your stopped jobs

    so for example you did
    Code:
     find /
    your stuff starts scrolling... you get tired and need to do something else...


    Code:
    ctrl-z
    [1]+  Stopped                 find /
    1 is the job number.
    just to be sure you can
    Code:
    jobs
    [1]+  Stopped                 find /
    Now you finished your other stuff and you want to resume

    Code:
    %1
    and the scrolling begins again

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2004
    Location
    Israel
    Posts
    61
    exactly! thank's a ton

  6. #5
    Just Joined!
    Join Date
    Jun 2004
    Location
    UK
    Posts
    88
    That's very helpful, solman66. I hadn't known about the %jobnumber trick. I've been using
    Code:
    fg
    to bring a stopped job back into the "foreground." Is one method better than the other?

  7. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I, too, have been using fg. However, I think they're more or less equivalent. Instead of "%job", you can just run "fg job". It's probably synonymous.

Posting Permissions

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