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 04-28-2010, 06:27 PM   #31
Registered: May 2006
Posts: 167

Original Poster
Rep: Reputation: 15

Originally Posted by EricTRA View Post
Hi all,

This thread is great, congratulations to grail for such a good job. I'm only sorry I couldn't participate more. My boss just gave me 13 IBM servers, so I'm playing with them a lot right now. But still checking in from time to time to pick up something new. Also congrats to mrgreaper for hanging in there and doing it. You're doing great! Did you think two days ago that you would encounter yourself at this point already?

Kind regards,


two days ago i never would of believed it to be so hard lol

its been rewarding when i have got certain things to work and understood some commands but also made me feel dumb when i couldnt understand other commands even after reading the --help and man 4 or 5 times lol

whats worse is the method that works (all bar dealing with spaces) which schneidz provided (again a thousand thanks) shows i was not parking up the wrong tree but in a different forest lol
Old 04-28-2010, 10:08 PM   #32
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,566

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
shows i was not parking up the wrong tree but in a different forest lol
Not at all ... just that there are literally hundreds of ways to do things in linux depending on which tools you choose to use


while read line
    if ! grep -q "${line##*/}" $current
        cp "$line" $unlock
        echo "${line##*/}" >> $current
done< <(find $tv -type f -name "*.avi")
Or when you are feeling a little trickier just do without the file all together:

while read line
    [[ ! -e "${unlock}/${line##*/}" ]] && cp "$line" $unlock;
done< <(find $tv -type f -name "*.avi")
The only thing really new in either of these is the following - "${line##*/}"
Which if you look here should help -

Let me know if any of the other pieces lose you
Old 04-28-2010, 11:41 PM   #33
Registered: Apr 2010
Posts: 82

Rep: Reputation: 23
Hi there,
Just did a quick read through on this thread, but...
From what I can make of it, you're after a solution to sync a local and remote folder, right?
Why not use the rsync utility?
Do a "man rsync" on a command line and see if it is any helps for you.
You basically run the rsyncd on the 'server' and use the rsync command on the client to sync server and client directories.
It will give you all kinds of exit codes if something failed. It will even do delta-copies if a file wasn't copied correctly the first time or if you had an error
I don't know if it's what you're after, but I just thought I'd mention it.
Good luck!


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
OS related questions burtonboarder230 Linux - Newbie 14 12-08-2008 03:45 PM
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 12:50 PM
LXer: Configuration Automation & Centralized Management With Puppet on Ubuntu LXer Syndicated Linux News 0 03-04-2007 02:46 PM
Multiple Problems, gtk+ related? kryptobs2000 Linux - Software 0 10-31-2006 04:28 PM
3 non-related questions Rognon Slackware 5 02-06-2004 05:45 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 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