Feeds:
Posts
Comments

Posts Tagged ‘‘Torrent files & Magnet Links’’

Lab 07 – First part…
Torrent files and Magnet Links (advantages and disadvantages)

To share files over Internet is very common the use of “peer to peer” applications, Bit Torrent and Magnet Links are two of that kind.

Bit Torrent seems to be more popular or more used, and is always a advantage since generally whatever is frequented is also well-attended, and this let find more updated resources on BitTorrent than Magnet Links.

BitTorrent itself does not offer a search facility to find files by name. A user must find the initial torrent file by other means, such as a web search; with Magnet links you are able to perform a search trough the client application and maybe the main advantage of Magnet links is that it allows resources to be referenced without the need for a continuously available host, while Bit Torrent works with a Internet hosting service system, which provide better performance whereby is faster, but you need to have an available “tracker” which is a computer that has the function to help the peers to communicate, peers that want to download the file must first obtain a torrent file for it, and connect to the specified tracker, which tells them from which other peers to download the pieces of the file [1] [1 – Wikipedia]

In other respects Bit Torrent could be securer, it doesn’t let to share entire directories, is necessary mark the files that the user wants to have in common with others, Magnet links allows shared a entire folder and this can cause some vulnerability.

luxeed_keyboard_black1

Lab 07 – Second part…
Task: Create a BASH shell script called backup. This script will backup all files in user’s home directory that were created or changed within the current day as a single compressed tar file in a ~/.backup/ directory. Each backup file name will be the current date. If a backup file exists already it will be overwritten without prompting.

#!/bin/bash

USERHOMEPATH=/home/$(logname)
echo “Backing up the files of the day in $USERHOMEPATH…”

#make a directory for the backup files if is not created yet…
BACKUPDIR=~/.Backup_Daily

if [ ! -e $BACKUPDIR ]
then
mkdir $BACKUPDIR
chmod 744 $BACKUPDIR
fi

#find $USERHOMEPATH -name ‘.*’ -prune -o -mtime 0 -print
#find $USERHOMEPATH -name ‘.*’ -prune -o -mtime 0 -print0 -exec tar cvf CHECKTHISOUT.tar {} +;
#find $USERHOMEPATH -name ‘.*’ -prune -o -mtime 0 -fprint0 | xargs -0 tar cvf IHATETHIS.tar

find $USERHOMEPATH -name ‘.*’ -prune -o -mtime 0 -print | tar cvf $BACKUPDIR/$(date “+20%y-%m-%d”).tar –no-recursion -T –

#where:
# -name ‘.*’ prune <— if a name of directory is found that starts with dot, then is pruned (ignored)
# -o <— “or” (otherwise)

echo “Backup finished…”

Read Full Post »