Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-02-2007, 05:27 PM   #16
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911

Originally Posted by Amenemhet
Thanks Tink, yes I need all the users stuff, so, will this do? Or is it just an ls of their home?
Also, how can I prevent people from logging on temporarily? Is there a way to use the nologin command and give it a time variable for say , while the backup is actually running?
tar -cvf /var/local/backup/homedir-$(date +%a-%b-%d).tar /home
This doesnt seem correct, and the man pages for no login are sparse, is there another command I could use?
nologin isn't a command, it's just a file. If it
exists users won't be permitted to login.

echo "Sorry, undertaking some maintenance - try again later" >/etc/nologin
tar -cvf /var/local/backup/homedir-$(date +%a-%b-%d).tar /home
rm /etc/nologin

Old 03-02-2007, 05:55 PM   #17
LQ Newbie
Registered: Mar 2007
Location: canada
Distribution: fedora core 5, ubuntu 6.1
Posts: 13

Rep: Reputation: 0

Originally Posted by Tinkster
nologin isn't a command, it's just a file. If it
exists users won't be permitted to login.

echo "Sorry, undertaking some maintenance - try again later" >/etc/nologin
tar -cvf /var/local/backup/homedir-$(date +%a-%b-%d).tar /home
rm /etc/nologin


LOL, man your clever
Just spent a few hours reading man pages and now my eyes are watering! I realize that nologin is a file in etc and should have figured out the route to take ... thats what I hate/love about first it seems so complicated, then when you figure it out it is usually the simplest. Thanks again
Old 03-03-2007, 09:50 PM   #18
LQ Newbie
Registered: Feb 2007
Location: Singapore
Distribution: Debian Sarge/Etch
Posts: 19

Rep: Reputation: 0
Originally Posted by gregorian
Yep, it worked. Brilliant. How did you get such an idea, genius? I'm very impressed.


Well, as you so rightly indicated, no brilliant solution, but it works

Your one-liner "mv" seems very clean but the "-r" switch (which I presume recurses) is not a valid one in my Sarge
Old 03-03-2007, 11:30 PM   #19
Registered: Apr 2006
Posts: 509

Rep: Reputation: 34
mv -rf A/* B/
You're right, in the above command, the 'r' switch stands for recursive. I find it strange that it didn't work for you, pk2001. I use the bash shell. I thought that the 'mv' command was the same for the *nix systems. But then again I'm new to Linux and have used only RH9.

Last edited by gregorian; 03-03-2007 at 11:31 PM.


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
useing SCP to copy entire directories with sub folders? Lleb_KCir Linux - General 5 09-13-2005 09:08 PM
xmms en que entire directories oily_rags Linux - Software 2 09-14-2004 01:50 PM
Move certain files into different directories facets Programming 6 05-28-2004 01:20 PM
partitioning a new drive, which directories can I move ? xucaen Linux - General 2 02-25-2004 09:03 PM
Can I move Untarred directories? Nigel_Tufnel Linux - General 5 08-08-2002 08:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:36 AM.

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