Windows 10 to be a cloud OS and an awesome LateX template for creating a document.

Posted: September 4, 2013. At: 11:27 AM. This was 4 years ago. Post ID: 6200

The new Windows operating system, Windows 10 will be a cloud based operating system. This means that a very basic installation of the OS will reside on the users computer and the cloud based office 365 will be used over the Internet to allow users to create documents and do their daily work. This is quite a move by Microsoft away from a traditional desktop computer with Windows installed and all applications. Will you still be able to install programs under the Program Files folder or will the whole thing be cloud based? Surely if you want to be able to run your games or experiment with applications such as Unity 3D or Cygwin you should be able to install applications locally. At least on Linux you can install applications from a central repository and enjoy the ability to install any desktop environment that you wish. I have gone back to the Gnome Shell desktop on Linux Mint 15. That is a good desktop environment when it is configured properly. And Linux has a usable office suite that is not cloud based. Microsoft Office has better compatibility though, and adding a TOC to a document works very well. I am learning LaTeX though. That allows you to create beautiful documents with an auto-generated Table Of Contents. This is a much better way of creating documents when you get used to it. You can go to writelatex.com and create documents right away with a dynamically updating preview.

Here is an example of a LaTeX document I created that uses code displayed in the document with pre-formatted text. This makes it easy to show code samples in a LaTeX document. But I have created an awesome document with this LaTeX code. This document explains how to install the Clamav anti-virus for Linux and use it to scan files on your system. This is perfect for a system that is a file-server providing files over Samba to Windows computers.

\documentclass[a4paper,10pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{url}
\usepackage[top=1in, bottom=1in, left=1.1in, right=1.1in]{geometry}
 
\begin{document}
 
\title{Installation of Anti Virus software for Linux.}
\author{John Cartwright}
 
\maketitle
\tableofcontents
 
\begin{abstract}
Installation of Anti Virus software for Linux. This is to protect Windows users who are connecting to the Linux server. Also a very useful backup script for our Linux machine. 
\end{abstract}
 
\chapter{Summary of installation.}
\section{Summary of installation.}
 
\paragraph{}
This document describes the installation and configuration of an Anti Virus product for Linux. I have chosen the Clamav Anti Virus product for x86 Linux.
 
\paragraph{}
 
This Anti-Virus product is installed on a Debian based system with this command: \textbf{[email protected]:~\$ sudo apt-get install clamav clamav-base}. This will install the Clamav product and enable the virus protection service on the Linux computer. This is very useful for protecting users of the Linux file server from any infected files that were put there by employees. This software will run automatically in the background and scan files to prevent infection of Windows clients that are accessing the Linux file server.
 
\chapter{Linux backup script.}
\section{Linux backup script.}
 
\paragraph{}
This is a very useful backup script to create a compressed archive of the shared folder on the Linux system and copy it to a backup drive.
 
\begin{verbatim}
#!/usr/bin/perl -W
use strict;
use POSIX ("strftime");
# A script to backup some files.
my $homedir = "$ENV{'HOME'}";
my $user = $ENV{'LOGNAME'};
my $date = strftime("%A-%d-%B-%Y-%H-%M-%S", localtime);
my $backupdrive = "/mnt/MyMedia";
print "Which directory do you want to backup?n";
#chomp(my $dir = <STDIN>);
$dir = "/opt/tafeshare";
if(!$dir) {
	print "No Directory selected!n";
	exit;
} else {
	my $target="$homedir/$dir";
	my $file = "$homedir/$user-$date.tgz";
	system("tar -cvf $file $target");
	print "nnSuccessful backup of directory: $dir.n";
# Naming the outfile.
	my $outfile="$user-$date.tgz";
# Moving the backup file to the destination.
	print "Moving the archive $outfile to the backup drive.n";
	system("mv $outfile $backupdrive");
 
# Checking to see if the backup file exists.
 
	my	$filename = "$backupdrive/$outfile";
	if (-e $filename) {
		print "nnBackup file exists. Great Success!nn";
	}
	exit;
}
\end{verbatim}
 
\chapter{Using the backup script.}
\section{Using the backup script.}
 
This script may be used by entering this into the cron jobs. This is done by typing crontab -e and entering this line.
 
\begin{verbatim}
30 17 * * * "/root/backup.sh"
\end{verbatim}
 
This will run the script every day at 17:30. The archives may easily be extracted and files recovered from each backup if this is required. Each backup image is date stamped, this makes finding the archive for a certain date simple. This is the perfect solution for backing up all user files at the end of the day.
 
\begin{thebibliography}{1}
 
	\bibitem{notes} http://www.securitronlinux.com/bejiitaswrath/backing-up-your-computer-is-very-important-indeed-how-to-do-it-with-linux-using-a-simple-script/ {\em securitronlinux.com.}  2011.
 
	\bibitem{notes} http://www.securitronlinux.com/uncategorized/crontab-and-vimrc-samples/ {\em securitronlinux.com.} 2011
 
\end{thebibliography}
 
\end{document}

Here is a template version of this document that you can use yourself to write something very cool.

\documentclass[a4paper,10pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{url}
\usepackage[top=1in, bottom=1in, left=1.1in, right=1.1in]{geometry}
 
\begin{document}
 
\title{ }
\author{ }
 
\maketitle
\tableofcontents
 
\begin{abstract}
 
\end{abstract}
 
\chapter{ }
\section{ }
 
\paragraph{}
 
\begin{thebibliography}{1}
 
	\bibitem{notes} {\em .} 2013
 
\end{thebibliography}
 
\end{document}

LaTeX is a perfect way to create complex documents as you can easily change the document around just by cutting and pasting code. The TOC is automatically updated every time the LaTeX code is rendered into a PDF file. This makes it a good way to create academic documents that have a professional appearance.

No comments have been made. Use this form to start the conversation :)

Leave a Reply