If you want to create a system that is similar to a different system you have already set up, it can be difficult to remember each and every package you had installed.This method works best when you are exporting to and importing from the same distribution and, specifically, the same releasefor example, exporting from Ubuntu Dapper to Ubuntu Dapper or ubuntu edgy to ubuntu edgy.
Ubuntu uses the APT package management system which handles installed packages and their dependencies. If we can get a list of currently installed packages you can very easily duplicate exactly what you have installed now on your new machine. Below is a command you can use to export a list of your installed packages.
sudo dpkg --get-selections | grep '[[:space:]]install$='| awk '{print $1}' > installedpackages Now you should end up with a file called “installedpackages” which consists of a long list of every package your currently have installed.
The next step would be to tell the clone machine to install each of those packages. You’ll have to copy that file to the clone machine (via network, usb drive, email, etc) and also make sure to duplicate the /etc/apt/sources.list file. Without the same access to repositories it may not be able to find the packages.
To tell your system to use the previously exported package list use the following command (after making sure to also clone your /etc/apt/sources.list file).
Update the source list using the following command
sudo aptitude update
Import the package list using the following command
Cluster ssh est un outil merveilleux ! Combien de fois ai-je du retaper les mêmes commandes dans deux fenêtres shell différentes sous prétexte que les serveurs faisaient la même chose… Je pense à mes deux serveurs DNS, par exemple.
Évidemment, il faut faire attention à ce qu’on tape car la moindre erreur est reproduite en double… Mais quel bonheur de faire deux fois le travail et surtout d’avoir des configurations identiques quand on le désire.
Autre avantage: si on ouvre plusieurs sessions ssh dans la même commande shell, cssh redimensionne les fenêtres automatiquement.
Attention: si vous ajouter des fenêtres après coup sur Ubuntu, il les superposera sur les précédentes ce qui n’est pas folichon… Il faut prévoir votre nombre de session au départ. Par contre, sur Mac OS X, l’excellent csshX fait le boulot correctement.
Find Files Based on Access / Modification / Change Time
You can find files based on following three file time attribute.
Access time of the file. Access time gets updated when the file accessed. Modification time of the file. Modification time gets updated when the file content modified. Change time of the file. Change time gets updated when the inode data changes. Lire la suite…
Here is the command to stop the creation of .DS_Store Directories that pollute your network storage resources. For For Mac OS X Lion you need to use: defaults write com.apple.desktopservices DSDontWriteNetworkStores true Now you must Logoff or Restart.
.AppleDouble
To stop the creation of .AppleDouble folders you need to edit your AFP service configuration. There is usually a « No AppleDouble » or « Enable AppleDouble » configuration setting that needs to be set true (For the NO option) or set to false (For the Enable Option).
Note: In FreeNAS 8.0.4 it seems that the .AppleDouble directories are created anyway regardless of setting. But at least they seem to be empty and can be removed (rm -r /path/).
The Who, What, and When
The .AppleDouble Directories are used by Mac OS X to store Extended Attributes (exattr) for files residing on filesystems that are not formatted HFS+. They are most commonly seen when moving a flash drive from your Mac to your Windows Machine.
The .DS_Store Directories store Finder Information. Such as in « Get File Information » you can access a « Comments » field. If you provide information on the file i the comment it is stored and Finder Information. If this directory is missing on remote storage, other Mac users would not be able to see the comment you created.
Why get rid of them?
On network storage you can have the same share presented over AFP (Apple Filing Protocol) andCIFS (Common Internet File System). Windows users that connect over CIFS can see the extra Apple directories. The files often copy the name of the original file and prefix it with « ._ ». Windows users can mistakenly access these files and think their data is corrupt.
Apart from the basic operation of looking for files under a directory structure, you can also perform several practical operations using find command that will make your command line journey easy.
In this article, let us review 15 practical examples of Linux find command that will be very useful to both newbies and experts. Lire la suite…