Articles taggués ‘shell’

How to Backup Linux? 15 rsync Command Examples

14/01/2019 Aucun commentaire

Source: TheGeekStuff

rsync-commandrsync stands for Remote SYNC.

rsync is used to perform the backup operation in UNIX / Linux.

rsync utility is used to synchronize the files and directories from one location to another in an effective way. Backup location could be on local server or on remote server.

Important features of rsync

  • Speed: First time, rsync replicates the whole content between the source and destination directories. Next time, rsync transfers only the changed blocks or bytes to the destination location, which makes the transfer really fast.
  • Security: rsync allows encryption of data using ssh protocol during transfer.
  • Less Bandwidth: rsync uses compression and decompression of data block by block at the sending and receiving end respectively. So the bandwidth used by rsync will be always less compared to other file transfer protocols.
  • Privileges: No special privileges are required to install and execute rsync


$ rsync options source destination

Source and destination could be either local or remote. In case of remote, specify the login name, remote server name and location.
Lire la suite…

Categories: Système Tags: , , , ,

Rsync (Remote Sync): 10 Practical Examples of Rsync Command in Linux

12/01/2019 Aucun commentaire

Source: (Tarunika Shrivastava)

Rsync (Remote Sync) is a most commonly used command for copying and synchronizing files and directories remotely as well as locally in Linux/Unix systems. With the help of rsync command you can copy and synchronize your data remotely and locally across directories, across disks and networks, perform data backups and mirroring between two Linux machines.

This article explains 10 basic and advanced usage of the rsync command to transfer your files remotely and locally in Linux based machines. You don’t need to be root user to run rsync command.

Some advantages and features of Rsync command
  1. It efficiently copies and sync files to or from a remote system.
  2. Supports copying links, devices, owners, groups and permissions.
  3. It’s faster than scp (Secure Copy) because rsync uses remote-update protocol which allows to transfer just the differences between two sets of files. First time, it copies the whole content of a file or a directory from source to destination but from next time, it copies only the changed blocks and bytes to the destination.
  4. Rsync consumes less bandwidth as it uses compression and decompression method while sending and receiving data both ends.
Basic syntax of rsync command
# rsync options source destination

Lire la suite…

Categories: Système Tags: , ,

compgen: An Awesome Command To List All Linux Commands

09/01/2019 Aucun commentaire

Source: nixCraft

Ever want to list all the Linux commands (including bash shell aliases and functions) you could run on the server / workstation? Look now further. Try compgen command.

compgen is bash built-in command and it will show all available commands, aliases, and functions for you. The syntax is:

compgen option

compgen command examples

To list all the commands available to you, enter:

compgen -c

Sample outputs:


You can search or count the commands:

compgen -c | grep find
compgen -c | wc -l
echo "$USER user can run $(compgen -c | wc -l) commands on $HOSTNAME."

Lire la suite…

Categories: Système Tags: ,

Ubuntu: la barre de menu disparait…

07/01/2019 Comments off

En cas de perte de la barre de menu et de la barre d’icônes, le seul moyen de les récupérer est de relancer gnome-panel.

A condition d’avoir un terminal ouvert (sinon on est un peu coincé puisqu’on ne peut plus le lancer avec Alt-F2), il suffit de lancer la commande:

killall gnome-panel

Cette commande va killer le process existant (s’il existe encore) et relancer cette partie de l’interface graphique de Ubuntu.

Plus d’infos sur Howto Restart Gnome Panel

Categories: Système Tags: , ,

How to restart Gnome Panel

07/01/2019 Comments off

Source: My Linux Notebook

It doesn’t happen a lot but it does sometimes when the Gnome Panel freeze. If you are a former windows user you might be used to restart the computer when something in you desktop stuck. This is not the way with Linux. We can fix the problem by restarting the desktop session (restarting the X server) pressing the Ctrl+Alt+BackSpace but this will destroy everything we worked on so far. A more elegant way will be to restart only the Gnome Panel.

Getting access to the Linux command line shell

In order to restart the Gnome Panel we will need to execute the Linux kill command. Once the Gnome Panel process is killed Gnome will restart it automatically so the only thing left for us is to kill the Gnome Panel process. In order to execute the Linux kill command we will need to get access to the Linux shell. This can be done by one of the following:

  1. Pressing Alt+F2
  2. Using an opened console window using the Alt+Tab buttons to navigate to it.
  3. Using a console session by pressing Ctrl+Alt+F1

Killing the Gnome Panel

In each of these options we will need to execute the Linux kill command in order to kill the Gnome Panel process. There are two ways to use the kill command:

  1. Using the application name will kill all the applications with the same name
  2. Using the process id (pid) will kill only the process with the specified id.

Back to our case with the Gnome Panel, we can use both of the options.

Lire la suite…

Categories: Système Tags: , ,