LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 03:05 AM   #1
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

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, 03:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
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, 03:15 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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, 04:27 AM   #4
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

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

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
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, 03:22 AM   #6
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

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, 03:29 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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, 10:56 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
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, 12: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 12:37 AM.
 
Old 02-14-2012, 05:42 AM   #10
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

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 06:41 PM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration