[K12OSN] Scripting help make link desktop to old home folder

James P. Kinney III jkinney at localnetsolutions.com
Mon Nov 5 02:43:18 UTC 2007


On Mon, 2007-11-05 at 15:18 +1300, Krsnendu dasa wrote:
> Thanks. That did the trick. I made the link.
> 
> Thanks for the info about cp. I was wondering how to copy home
> directories without the . files. 

cp is kind of funny. You have explicitly _include_ the . files. As such,
it has it's uses :)

A second process would be tar and then overwrite the . files from
the /etc/skel . files. If you look in /opt/ltsp/scripts/k12ltsp/ there
are a pair of scripts that will either reconfig an individual user or
everyone. This is a lifesaver for when someone figures out how to remove
all their panels and menus and _then_ discovers they now can'tget
anything done :)  
> 
> On 05/11/2007, James P. Kinney III <jkinney at localnetsolutions.com>
> wrote:
>         Since all of the config stuff is in . files, copy all of the
>         files over
>         and that won't break the new configs.
>         
>         cp -arp <oldhome> <newhome>  assuming a mounted old home that
>         is
>         accessable to root. 
>         
>         You can use:
>         cd /home
>         for name in `ls -1`
>         do
>         ln -s /<oldhome>/$name /home/$name/Desktop/Old_Files
>         done
>         
>         
>         On Mon, 2007-11-05 at 09:12 +1300, Krsnendu dasa wrote:
>         > We migrated from K12ltsp to Feisty. It seemed cleaner
>         (config files 
>         > etc) to make new home directories, give them a week or so to
>         copy what
>         > they want then delete the old one. We still have a backup if
>         > necessary.
>         >
>         > On 05/11/2007, Peter Hartmann <ascensiontech at gmail.com>
>         wrote:
>         >         Why the new homes?  What was wrong with mounting old
>         ones on
>         >         the new server?
>         >
>         >         $USER  is the environment variable for the current
>         user. 
>         >
>         >         Peter
>         >
>         >         On 11/4/07, Krsnendu dasa <krsnendu108 at gmail.com>
>         wrote:
>         >         > We have moved our users to a new server. We have
>         created new 
>         >         home
>         >         > directories for each user.
>         >         > Users would like to access their previous home
>         directories
>         >         to access files.
>         >         > Can someone help me with a script to create a link
>         on the 
>         >         desktop to their
>         >         > old files.
>         >         >
>         >         > I have the basic logic of it but don't know the
>         commands.
>         >         >
>         >         > The script will be something like: 
>         >         >
>         >         > For all users do this
>         >         > ln -s /home/old/home/<username>
>         >         > /home/<username>/desktop/oldhome
>         >         >
>         >         > Just need to figure out how to get the user name
>         into the 
>         >         command and
>         >         > recurse the usernames.
>         >         > Probably the easiest way is to go through
>         the /home
>         >         directory and strip off
>         >         > the /home/ part to get the username. 
>         >         >
>         >         > Can anyone help me out? It seems simple in theory.
>         >         >
>         >         >
>         >         >
>         >         >
>         >         > _______________________________________________ 
>         >         > K12OSN mailing list
>         >         > K12OSN at redhat.com
>         >         > https://www.redhat.com/mailman/listinfo/k12osn
>         >         > For more info see <http://www.k12os.org>
>         >         >
>         >
>         >         _______________________________________________
>         >         K12OSN mailing list 
>         >         K12OSN at redhat.com
>         >         https://www.redhat.com/mailman/listinfo/k12osn
>         >         For more info see < http://www.k12os.org>
>         >
>         >
>         > --
>         > This message has been scanned for viruses and
>         > dangerous content by MailScanner, and is
>         > believed to be clean.
>         > _______________________________________________
>         > K12OSN mailing list
>         > K12OSN at redhat.com
>         > https://www.redhat.com/mailman/listinfo/k12osn
>         > For more info see <http://www.k12os.org>
>         --
>         James P. Kinney III
>         CEO & Director of Engineering
>         Local Net Solutions,LLC
>         770-493-8244
>         http://www.localnetsolutions.com
>         
>         GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
>         <jkinney at localnetsolutions.com>
>         Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C
>         6CA7 
>         
>         _______________________________________________
>         K12OSN mailing list
>         K12OSN at redhat.com
>         https://www.redhat.com/mailman/listinfo/k12osn
>         For more info see <http://www.k12os.org>
>         
> 
> 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean. 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC        
770-493-8244                    
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/k12osn/attachments/20071104/f02285a2/attachment.sig>


More information about the K12OSN mailing list