Welcome to Our Website!

 File Syncing  Our main purpose and intent. We have started "sharing" our WebPage files between our Windows 7 Laptop and our openSuSE Linux Desktop. Now sharing may not be the correct word, but it will suffice for the moment. What we are really doing is trying to use "both" machines to build our WebPages. Since we make lots of changes to the Desktop, we decided to make the Laptop our "Main Machine" for our WebPages. Some may say that is bad cause of the portability of the Laptop -but- 90% of the time it is right here next to the Desktop. It, the Laptop, has become a very important part of our day-to-day operations. We had put off getting a Laptop because we thought that it would sit and go unused 'most' of the time. Because of a "Hard Disk" failure on our Desktop, that concept got changed. Since then we have been working with both.

We, for the most part, keep our WebPages on our Laptop. However, we like the keyboard and screen of the Desktop better. So, with our latest setup (since May of 2012), we have our two machines Networked together. -And- we can edit the files on the Laptop from the Desktop. However, there are times that we want to "capture" something on our Desktop and place it in our WebPages. This is much easier IF the file being edited is 'on' the Desktop. So, the reason for the "Sync" need... and just because.

Now there are some programs out there that we could use to maintain this synchronization -but- they either cost lots of, well deserved, money -or- we haven't had the time to check them out -or- both. And at this time we trust ourselves more so than the others. Just the way it is. That is the reason for the 'find' info further down below.

 JFileSync / 6:17am  We found this one on the Web and it claims to be able to Sync between Windows and Linux - which is just what we need. It is a Java applet program and requires JRE 5.0 or later. To check IF Java is installed and which version go to Java.com. We had Version 6 Update 31. Version 7 Update 4 was offered so we brought it down... and installed it on the Laptop. The Linux Desktop was left alone. We'll see how it works. Mainly cause we couldn't figure out how to get a later version. One of those Linux - openSuSE things. -And- at the moment we don't want to take the time. However, we do plan on using it... in the not to distant future.
Refer: JFileSync

  JFileSync

java -jar /windows/L/jfilesync/lib/jfs.jar

This JFileSync is basically one file, jfs.jar, which was placed on our Linux Desktop in a newly created directory - /windows/L/jfilesync/. It is executed on our Linux Desktop, after switching to the library(lib), as "java -jar jfs.jar".

 Added 4:15pm  On the Windows Laptop we created a directory inside /xampp/htdocs called jfilesync/. JFileSync files were copied over to it with appropriate changes. So with this the Java applet will execute on both systems... and it is directly above the public_html dir. Well, the dir containing it is, on both Systems. Now to read up on how to use it.

JFileSync is used to synchronize 'pairs' of directories. For instance, if you want to ensure that a certain set of files located on your Workstation matches a corresponding set on your Laptop or an external data drive.

 Added 4:33pm  According to the Help file, we must first create a synchronization profile. This will specify the directory pairs.

 First use:  

  • Started it up on the Laptop.
  • Edited/Created our profile:
        Source: C:\xampp\htdocs\public_html <- on the Windows Laptop
        Target: \\Dusty-TR2\windrvl\public_html <- on the Linux Desktop
  • Did the Compare - took about 15mins or so... we forgot to time it.
  • Oooops we see that it says 11min 31sec along the bottom.
  • Now it wants to Sync -and- we are just not sure which way it is going.
  • MyCompAdventures.html is different on both. It wants to know which to copy.
    Now this is silly -but- it offers to 'Copy Source' -or- 'Copy Target'.
    Is that to -or- from??? We have saved both of the files that we changed
    and we want to copy 'from' the Linux PC 'to' the Windows Laptop. So,
    we are gona say "Copy Target".
  • Now we exit... check which way the copy went and add in these notes.
  • We clicked on 'File' and then 'Exit' and it asked if we really wanted
    to exit. Hmmmm?? Why?? Don't know -but- we just exited and we'll see
    what happens when we start it up -after- we check our files.
  • Ok. Nothing going/changed on the Windows PC. So, we are gona fire up VMware/ Win2k/ Homesite on the Linux Desktop and check things out.
===================
Well, we didin't do something right. It did NOT over-write the files on
our Desktop -but- it didn't copy them over to the Laptop either.
Might have something to do with "Are you sure you want to exit?" Hmmmm...
===================
Must go to work... will play more afterwards.

When is the copy/over-write performed???

And the answer is... when you allow the Synchronize to finish... everything. No skips. We had skipped one... well what we thought was the rest... and it turned into everything. So, for now, till we learn more about this... we will just click all the buttons through to the end. Will try to list them here shortly. To be on the 'safe' side, we are exiting our Homesite editor -before- we try the 'synchronization'. Even though we have done a save.

 Ok now, this is the order it is done
First Edit the file -on- the Desktop PC. Then the following operations are performed via JFileSync on the Laptop.

  1.  Start Assistant 
  2.  Edit Profile  - Everything looks good. No changes. Click Ok
  3.  Compare  - Show Details - should only find one... this one. We see that it has listed this file on both sides. The Laptop at 12/9/12 5:26pm -  Desktop  at 12/10/12 8:22am -But- it is checking them all. 12m0s.
  4.  Synchronize  - Show Details - It shows: Copy 'from' Desktop 'to'  Laptop .
    Click Ok. Says Synchronization was performed successfully.
  5.  Close 
  6. File - Exit - Ok, really quit.
  7. Check the Laptop file... Yep! It got updated.
    • Alllllrighty Now... Let us see IF it will go the other way... changes made to the files on the Laptop and then sync'd with the Desktop.
  8. Editing the file... this one again... only on the Laptop.
  9. Now Jump back to step one... and repeat.
  10. Allllllrighty.... it goes 'both' ways!! We are Happy!!
  11. However, can not be in a hurry. It takes almost 15min to perform the Synchronization. -But- that is a short time in comparison to the manual way.



The following was originally presented by: The Geek Stuff. Anything correct, they get the credit, anything incorrect we'll take the blame, cause we did make changes and additions to suit our needs. -But- use at your discretion. There is more info at their site. We only copied over the portion that we were interested in at this time.

-And- what was that?? We wanted to check the modification -or- changed times of the file comprising our WebPages. We could then compare them and take the appropriate actions. Using the 'find' command on Linux -and- 'Windows Explorer' on Windows, we could peruse the WebPage directories and compare the dates. This was not as big a hassel as it sounds. We had not made that many changes. Now we have the same files on both machines (except this one) -and- they are backed up. Now we can 'experiment' with JFileSync. Weelllll... only IF we pay attention to what machine we are on!! -And- this very first time -- we didn't. Was editing the Laptop files on the Desktop insted of the files on the Desktop. That mistake/oversight has been corrected and for a brief moment these files were the same again.

Find Files Based on Access / Modification / Change Time

You can find files based on following three file time attributes:

  1. Access time of the file. Access time gets updated when the file accessed.
  2. Modification time of the file. Modification time gets updated when the file content modified.
  3. Change time of the file. Change time gets updated when the inode data changes.

 
In the following examples, the difference between the min option and the time option is the argument.

  • min argument treats its argument as minutes. For example, min 60 = 60 minutes (1 hour).
  • time argument treats its argument as 24 hours. For example, time 2 = 2*24 hours (2 days).
  • While doing the 24 hours calculation, the fractional parts are ignored so 25 hours is taken as 24 hours, and 47 hours is also taken as 24 hours, only 48 hours is taken as 48 hours. To get more clarity refer the -atime section of the find command man page.

Example 1: Find files whose content got updated within last 1 hour

To find the files based up on the content modification time, the option -mmin, and -mtime is used. Following is the definition of mmin and mtime from man page.

  • -mmin n File’s data was last modified n minutes ago.
  • -mtime n File’s data was last modified n*24 hours ago.

 
Following example will find files in the current directory and sub-directories, whose content got updated within last 1 hour (60 minutes)

# find . -mmin -60

 
In the same way, following example finds all the files (under root file system /) that got updated within the last 24 hours (1 day).

# find / -mtime -1

Example 2: Find files which got accessed before 1 hour

To find the files based up on the file access time, the option -amin, and -atime is used. Following is the definition of amin and atime from find man page.

  • -amin n File was last accessed n minutes ago
  • -atime n File was last accessed n*24 hours ago

 
Following example will find files in the current directory and sub-directories, which got accessed within last 1 hour (60 minutes)

# find -amin -60

 
In the same way, following example finds all the files (under root file system /) that got accessed within the last 24 hours (1 day).

# find / -atime -1

Example 3: Find files which got changed exactly before 1 hour

To find the files based up on the file inode change time, the option -cmin, and -ctime is used. Following is the definition of cmin and ctime from find man page.

  • -cmin n File’s status was last changed n minutes ago.
  • -ctime n File’s status was last changed n*24 hours ago.

 
Following example will find files in the current directory and sub-directories, which changed within last 1 hour (60 minutes)

# find . -cmin -60

 
In the same way, following example finds all the files (under root file system /) that got changed within the last 24 hours (1 day).

# find / -ctime -1

Example 4: Restricting the find output only to files. (Display only files as find command results)

The above find command’s will also show the directories because directories gets accessed when the file inside it gets accessed. But if you want only the files to be displayed then give -type f in the find command as
 
The following find command displays files that are accessed in the last 30 minutes.

# find /etc/sysconfig -amin -30
.
./console
./network-scripts
./i18n
./rhn
./rhn/clientCaps.d
./networking
./networking/profiles
./networking/profiles/default
./networking/profiles/default/resolv.conf
./networking/profiles/default/hosts
./networking/devices
./apm-scripts
[Note: The above output contains both files and directories]

# find /etc/sysconfig -amin -30 -type f
./i18n
./networking/profiles/default/resolv.conf
./networking/profiles/default/hosts
[Note: The above output contains only files]

Example 5: Restricting the search only to unhidden files. (Do not display hidden files in find output)

When we don’t want the hidden files to be listed in the find output, we can use the following regex.
The below find displays the files which are modified in the last 15 minutes. And it lists only the unhidden files. i.e hidden files that starts with a . (period) are not displayed in the find output.

# find . -mmin -15 \( ! -regex ".*/\..*" \)

   

  Examples from the Blend Template

An H3 Followed by a Blockquote:

“Donec leo, vivamus nibh in augue at urna congue rutrum. Quisque dictum integer nisl risus, sagittis convallis, rutrum id, congue, and nibh.”

Bulleted List:

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Phasellus nec erat sit amet nibh pellentesque congue.
  • Cras vitae metus aliquam risus pellentesque pharetra.

Numbered List:

  1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  2. Phasellus nec erat sit amet nibh pellentesque congue.
  3. Cras vitae metus aliquam risus pellentesque pharetra.

Consectetuer adipiscing elit. Nam pede erat, porta eu, lobortis eget, tempus et, tellus. Etiam neque. Vivamus consequat lorem at nisl. Nullam non wisi a sem semper eleifend. Donec mattis libero eget urna. Duis pretium velit ac mauris. Proin eu wisi suscipit nulla suscipit interdum. Aenean lectus lorem, imperdiet at, ultrices eget, ornare et, wisi. Pellentesque adipiscing purus ac magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.