LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-08-2012, 04:05 AM   #1
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 48

Rep: Reputation: Disabled
Can I use "nohup" on "mv"


Like this
nohup mv /users/q /users/w

I test it on Xstart and then it turns to no responding
Why and thanks
 
Old 02-08-2012, 04:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
should work fine. what does "no responding" mean? as there is no -v flag it won't tell you what it's doing until it's finished, is that what you're confused about? Needing to put it in a nohup suggests there's a lot of data to move in the first instance.
 
Old 02-08-2012, 04:15 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

If with "no responding" you mean you don't get the prompt back: Put an ampersand after the command:
Code:
nohup mv /users/q /users/w &
Hope this helps.
 
Old 02-08-2012, 05:27 AM   #4
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
Thanks, the files size is 200Gb
And maybe it is the problem.Thanks
 
Old 02-08-2012, 05:33 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
Quote:
Originally Posted by druuna View Post
Hi,

If with "no responding" you mean you don't get the prompt back: Put an ampersand after the command:
Code:
nohup mv /users/q /users/w &
Hope this helps.
I always find it strange that it doesn't background it, you'd have thought that'd be default behaviour really. I guess that would deviate from how consistently gnu programs work in general though.
 
Old 02-13-2012, 04:22 AM   #6
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
something happen again

it appears the word
Code:
" nohup: appending output to `nohup.out'"
what does it mean
 
Old 02-13-2012, 04:29 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by ytyyutianyun View Post
it appears the word
Code:
" nohup: appending output to `nohup.out'"
what does it mean
To preserve any (possible) output generated by the command, nohup will put this output in a file called nohup.out.

This file will be placed were the command was executed.

Hope this helps.
 
Old 02-13-2012, 11:56 PM   #8
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
mv == rename :
iirc, if src & tgt src on same partition, it just renumbers the inode entries in the containing dir files.
If src & tgt are on different partitions, then it will have to physically 'move' the entire 200GB of data.
 
Old 02-14-2012, 01:21 AM   #9
Geek255
Member
 
Registered: Feb 2012
Posts: 41

Rep: Reputation: Disabled
nohup is use to run a program/script after you exit the system. If you log back in you can see the running process by typing

tail -f nohup.out

Whenever I learn a new command I always do a test run on it. The first time I used this command I created a counting script and logged out of the system for 1 minute.

I logged back in and ran tail -f nohup.txt and the output was


75
76
77
78
79

And so on.

This is a partial output. The script was still running and appending the results to the nohup.txt file

BTW, you can redirect the output to another file besides the default one.

Last edited by Geek255; 02-14-2012 at 01:37 AM.
 
Old 02-14-2012, 06:42 AM   #10
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
Thanks, I know. Good all of you are
 
  


Reply

Tags
mv, nohup


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unpredictable "delete" "move to trash" or "cut" file menu option dorianrenato Linux - General 3 11-28-2011 07:41 PM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM


All times are GMT -5. The time now is 10:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration