Μηνιαία αρχεία: Απρίλιος 2018


How we sync files between two drives

The rsync command is a powerful tool for file synchronization and transfer in Linux and Unix-like operating systems. It provides a robust and efficient way to copy, backup, and mirror files and directories both locally and remotely. In this article, we will explore the technical details of the following rsync command:

rsync -avh --delete --progress "path/to/source/" "path/to/destination/";

We will explain each option and argument used in the command and their respective functionality.

Options and Arguments

The rsync command is a versatile tool with many options and arguments to customize its behavior. The options used in the above command are:

  • “-a”: This option enables the archive mode, which is a shorthand for several options such as -rlptgoD, -l, -p, -t, -g, -o, and -D. It ensures that rsync preserves file permissions, ownership, timestamps, and symbolic links during the synchronization process.
  • “-v”: This option enables verbose mode, which displays detailed output of the rsync operation, including the transferred files and their sizes.
  • “-h”: This option enables human-readable mode, which displays file sizes in a more readable format, such as “1K” for 1 kilobyte, “1M” for 1 megabyte, etc.
  • “–delete”: This option tells rsync to delete any files at the destination that do not exist at the source. This ensures that the destination is an exact copy of the source.
  • “–progress”: This option displays real-time progress information during the rsync operation, including the percentage of completion and the estimated time remaining.

The arguments used in the command are:

  • “path/to/source/”: This argument specifies the source directory or file that we want to sync. It can be a local path or a remote path using the ssh protocol.
  • “path/to/destination/”: This argument specifies the destination directory or file where we want to copy the source files. It can also be a local or remote path using the ssh protocol.

Explanation

The rsync command is a powerful tool that synchronizes the source and destination directories or files. The -a option enables the archive mode, which ensures that the file metadata is preserved during the transfer, including permissions, ownership, timestamps, and symbolic links. The -v option enables the verbose mode, which provides detailed output of the rsync operation, including the transferred files and their sizes.

The -h option enables the human-readable mode, which displays file sizes in a more readable format. The –delete option tells rsync to delete any files at the destination that do not exist at the source, which ensures that the destination is an exact copy of the source. Finally, the –progress option displays real-time progress information during the rsync operation, including the percentage of completion and the estimated time remaining.

Conclusion

The rsync command is a powerful tool for file synchronization and transfer in Linux and Unix-like operating systems. The command discussed in this article synchronizes the source and destination directories or files, preserves file metadata, displays detailed output, deletes any files that do not exist at the destination, and displays real-time progress information. With the proper use of rsync options and arguments, file synchronization and transfer can be made easy, efficient, and reliable.

Other

We have two external hard disks that we use to keep backups of our data.
The way we do that is by using the command rsync that makes our life easy.

Specifically, we use the following command to synchronize the first hard disk with the second one: rsync -avh –delete –progress “path/to/source/” “path/to/destination/”;

rsync is a fast, versatile, remote (and local) file-copying tool, it is available in almost every system (GNU/Linux, Unix (MacOS as well) and Windows).

The parameters we use are the following:

  • -a, --archive enables archive mode which is equal to -rlptgoD (no -H,-A,-X)
    In more detail it enables all of the following options
    -r, --recursive recurse into directories
    -l, --links copy symlinks as symlinks
    -p, --perms preserve permissions
    -t, --times preserve modification times
    -g, --group preserve group
    -o, --owner preserve owner (super-user only)
    -D same as --devices --specials
    --devices preserve device files (super-user only)
    --specials preserve special files
  • -v, --verbose it increases verbosity of the output
  • -h, --human-readable outputs numbers in a human-readable format
  • --delete deletes extraneous files from destination directories
  • --progress shows progress during transfer

MTN Cyprus – Get SIM Card IMSI and MSISDN using USSD codes

Because of reasons we wanted to find the IMSI of a SIM card and the MSISDN of its connection on a phone we had in our hands.
We did not wish to install additional applications on that phone to get this information so we had to find an alternative method in getting the IMSI and the MSISDN.
Luckily for us there was a way using the USSD codes that were provided by MTN Cyprus.

Using the dialer (phone application) of our phone we typed the following two commands (one at a time) and then pressed the call (green) button.

To get the MSISDN we called:

*1#

To get the IMSI we called:

*888#

After each call a popup message would appear from the provider (MTN) showing us the information asked.

References

Unstructured Supplementary Service Data (USSD), sometimes referred to as “Quick Codes” or “Feature codes”, is a communications protocol used by GSM cellular telephones to communicate with the mobile network operator’s computers. USSD can be used for WAP browsing, prepaid callback service, mobile-money services, location-based content services, menu-based information services, and as part of configuring the phone on the network.

From: https://en.wikipedia.org/wiki/Unstructured_Supplementary_Service_Data

 

MSISDN is a number uniquely identifying a subscription in a GSM or a UMTS mobile network. Simply put, it is the mapping of the telephone number to the SIM card in a mobile/cellular phone. This abbreviation has a several interpretations, the most common one being “Mobile Station International Subscriber Directory Number”.

From: https://en.wikipedia.org/wiki/MSISDN

 

The International Mobile Subscriber Identity or IMSI is used to identify the user of a cellular network and is a unique identification associated with all cellular networks. It is stored as a 64 bit field and is sent by the phone to the network. It is also used for acquiring other details of the mobile in the home location register (HLR) or as locally copied in the visitor location register. To prevent eavesdroppers identifying and tracking the subscriber on the radio interface, the IMSI is sent as rarely as possible and a randomly generated TMSI is sent instead.

From: https://en.wikipedia.org/wiki/International_mobile_subscriber_identity

 


Μίκρη Αννούλα

  • Γιατί η μικρή Αννούλα τρέχει γύρω γύρω από το τραπέζι;
    – Γιατί της έχουν καρφώσει το χέρι στο τραπέζι.
  • Και γιατί η μικρή Αννούλα σταμάτησε να τρέχει γύρω γύρω από το τραπέζι;
    – Γιατί βαρέθηκαν να την βλέπουν να τρέχει και της κάρφωσαν και το άλλο.
  • Τι δώρο έκανε ο Αγιος Βασίλης στην μικρή Αννούλα για να ξεχάσει το ατύχημα που έχασε τα χέρια της;
    – Μία μπάλα του μπάσκετ, και ένα ζευγάρι γάντια.
  • Τι βρήκε η μικρή Αννούλα στο βυθό της θάλασσας;
    – Φρικτό θάνατο.
  • Γιατί η μικρή Αννούλα φταρνίζεται συνεχώς;
    – Γιατί έχει αλλεργία στα θυμαράκια.
  • Τι μαζεύει η μικρή Αννούλα από το δρόμο;
    – Τα άντερα της.
  • Τι κάνει η μικρή Αννούλα με μια σπάτουλα μες τη μέση του δρόμου;
    – Προσπαθεί να ξεκολλήσει τον μικρό Κωστάκη από την άσφαλτο.
  • Γιατί η μικρή Αννούλα γελάει;
    – Γιατί τη γαργαλάνε τα σκουλήκια.
  • Γιατί η μικρή Αννούλα νιώθει μοναξιά;
    Γιατί τα σκουλήκια πήγαν στον τάφο του Κωστάκη.
  • Γιατί η μικρή Αννούλα δεν μπορεί να πάρει τα παιχνίδια της μαζί;
    – Γιατί δεν χωράνε όλα στο φέρετρο.
  • Γιατί η μικρή Αννούλα δακρύζει;
    – Γιατί έχουνε φυτρώσει κρεμμύδια γύρω από τον τάφο της.
  • Γιατί η μικρή Αννούλα δεν είναι παρθένα;
    – Γιατί ο αδερφός της είναι νεκρόφιλος
  • Γιατί η μικρή Αννούλα δεν μπορεί να κάνει μακροβούτι;
    – Γιατί τα πτώματα επιπλέουν στην επιφάνεια.
  • Γιατί η μικρή Αννούλα χαμογελάει;
    – Γιατί αυτό που κόλλησε ήταν μεταδοτικό.
  • Τι κοινό έχει η μικρή Αννούλα με τον αδελφό της;
    – Δολοφόνο.
  • Τι κοινό έχει η μικρή Αννούλα με τις ξαδέρφες της;
    – Κοινό Τάφο.
  • Τι κοινό έχει η μικρή Αννούλα με τον μικρό Κωστάκη;
    – Γιορτάζουν την ίδια μέρα, το Ψυχοσάββατο.
  • Γιατί η μικρή Αννούλα πέθανε κάνοντας πρόβα τη σχολική παράσταση;
    – Έκανε πρόβα μπροστά σε βενζινάδικο το “κοριτσάκι με τα σπίρτα”.
  • Τι γράφει στο μέτωπο της μικρής Αννούλας;
    OVLOV.
  • Τι συνδέει την μικρή Αννούλα με τον μικρό Κωστάκη;
    – Ένας προφυλακτήρας.
  • Γιατί όταν η μικρή Αννούλα έπεσε από τον 30οστό όροφο δεν έφτασε ποτέ στη γη;
    – Γιατί τα άντερα της μπλέχτηκαν στα καλώδια της ηλεκτρικής.
  • Πως πίνει η μικρή Αννούλα την βότκα της;
    – Με ενέσεις.
  • Γιατί το τζαμάκι στο φέρετρο της μικρής Αννούλας έχει υδρατμούς;
    – Γιατί αναπνέει ακόμα.
  • Γιατί η μικρή Αννούλα δεν μπορεί να κάνει ποδήλατο;
    Γιατί δεν έχει πόδια.
  • Γιατί η μικρή Αννούλα δεν παίζει με τα άλλα παιδάκια;
    – Γιατί βρίσκεται σε αποσύνθεση.

Install Required Plugins of Gillion | Multi-Concept Blog/Magazine & Shop WordPress Theme

For Gillion (the Multi-Concept Blog/Magazine & Shop WordPress Theme) to properly work, it needs the WPBakery Page Builder (formerly Visual Composer) and the Unison plugins. In a clients’ page, they did not get the message prompting to install the required plugins and could not find it again. Unison is available through WordPress Plugin Directory so that was easy to setup. On the other hand, WPBakery (and the Revolution slider) it is not available through the directory as it is a commercial product. After reading through the support forums we realised that they should not need to make a separate purchase of the plugin, the theme will be able to pull it automatically from a CDN of shufflehound (without getting support from the WPBakery team).

Solution: In case you are facing the same issue, you can find the installation link under the left side menu Appearance where a new option will be available called Install Plugins (the link will be similar to this http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins). We installed for them the two required plugins and their theme was operational.

Links: