Category: OS

How do I uninstall Java 7 and later versions on my Mac?

By Zilli,

Following the steps listed will uninstall Oracle Java from your system using a Terminal.

Click on the Finder icon located in your dock
Click on Applications tab on sidebar
Click on the Utilities folder
Double-click on the Terminal icon
In the Terminal window, copy and paste the command:

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

  Category: OS
  Comments: None

Delete .DS_Store files on remote disks

By Zilli,

Go to terminal and execute this command:

defaults write DSDontWriteNetworkStores true


  Category: OS
  Comments: Comments Off on Delete .DS_Store files on remote disks

Password protect zip files in OS X

By Zilli,

Password protect a zip file archive Creating a password protected zip file is easy in Mac OS X and does not require any add-ons or downloads. Instead, use the zip utility that is bundled with all Macs.

If you’re familiar with the command line, the syntax of the encrypted zip command is as follows:

zip -e [archive] [file]

For encrypting multiple files with a password, such as folder or an entire directory, the syntax would be as follows:

zip -er [archive] [folder]

If you’re not sure how to use that, read on to learn how to create zip archives encrypted with passwords. These encrypted zip files will maintain password protection across platforms, meaning you can send a protected zip file to a Windows user and they will still need to enter the password in order to view the contents.

Zip Password in Mac OS X

Set a Zip Password in Mac OS X

You can create password protected archives of files and folders:

Launch the Terminal from the Applications > Utilities folder

Type the following command:

zip -e filetoprotect.txt

Enter and verify the password – don’t forget this

The resulting archive, in this case named “”, is now encrypted with the password provided. The file that was encrypted, “filetoprotect.txt”, is now inaccessible without entering that password.

If you plan on compressing multiple files within a folder, you will want to slightly modify the command with the -er flag like so:

zip -er /path/to/directory/

This is particularly important for encrypting zips of multiple files under OS X Mavericks.

Example: Zipping a Folder and Setting a Password

Here is an example of what this will look like from the command line, in this case we are compressing and password protecting the entire ‘Confidential’ folder located within the users /Documents directory, and the password protected zip is being placed on the users desktop for easy access:

$ zip -er ~/Desktop/ ~/Documents/Confidential/
Enter password:
Verify password:
adding: ~/Documents/Confidential/ (deflated 13%)

Notice the password will not display, this is normal behavior for the Terminal.

Notice that with a folder of multiple files, you will want to use the -er flag, the addition of the r indicates that zip will recursively compress and password protect all files in the folder.

Opening the Password Protected Zip

Despite being created at the command line, you do not need to unzip the file from the terminal, it can be expanded from the Mac OS X Finder or within Windows using standard unzipping apps. Just double click on the file, then enter the password, and it will decompress. You can also decompress the zip archive from the command line with:


Here are some use cases for password protected zip archives:

Password protecting an individual file or directory

Sending a sensitive and encrypted file over an unencrypted network

Emailing confidential data to a Windows user

Adding an additional layer of security to a hidden folder

Password protecting your own backups, outside of Time Machine

While this can provide some protection on a per-file or folder basis, it’s always a good idea to password protect the Mac in general with a login requirement on system boot, wake from sleep, and waking from the screen saver.

  Category: OS
  Comments: None

Manually update a new version of wordpress

By Zilli,

1. back up all your wordpress files and databases
2. download the latest version of wordpress
3. deactivate all your plugins: Go to Plugins >Installed plugins
4. Now keep the following files/folders in your web directory:

  • wp-config.php
  • wp-content
  • .htaccess

  Category: OS
  Comments: None

Downgrade Synology DSM 5.0 to 4.3

By Zilli,

What you’ll need:
DSM5.0-4482 (or newer is installed) for your particular DS.
DSM4.3-3827 for your particular DS.
Assistant Synology DS
A network and some cables.
A disk to be used for installation.
Your data, back up a safe place.
A DiskStation be downgraded.
Get the DSM versions here

… Continue reading

  Category: OS
  Comments: None

CLI – List of all MySQL command

By Zilli,

List of all MySQL commands:
Note that all text commands must be first on line and end with ‘;’

?         (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit      (\e) Edit command with $EDITOR.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
nopager   (\n) Disable pager, print to stdout.
notee     (\t) Don't write into outfile.
pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.

  Category: OS
  Comments: None

Set up scaling option for DSM Synology

By Zilli,

* Check scaling setup:

sysctl net.ipv4.tcp_window_scaling

* Turned off scaling to 0 as root:

sysctl -w "net.ipv4.tcp_window_scaling=0"

* To maintain the changes after a restart, include the file

vi /usr/syno/etc/rc.d/
sysctl -w "net.ipv4.tcp_window_scaling=0"
 chmod +x /usr/syno/etc/rc.d/


Slow connection and email attachments download to 0 kb

Configuration of operating systems

TCP Window Scaling is implemented in Windows since Windows 2000. It is enabled by default in Windows Vista / Server 2008 and newer, but can be turned off manually if required.

Linux kernels (from 2.6.8, August 2004) have enabled TCP Window Scaling by default. It chooses the good value of the option by default. The configuration parameters are found in the /proc filesystem, see pseudo-file /proc/sys/net/ipv4/tcp_window_scaling and its companions /proc/sys/net/ipv4/tcp_rmem and /proc/sys/net/ipv4/tcp_wmem

Scaling can be turned off by issuing the command sysctl -w “net.ipv4.tcp_window_scaling=0” as root. To maintain the changes after a restart, include the line “net.ipv4.tcp_window_scaling=0” in /etc/sysctl.conf.

FreeBSD, NetBSD and Mac OS X 
The default setting for FreeBSD, NetBSD and Mac OS X is to have window scaling (and other features related to RFC 1323) enabled.
To verify their status, a user can check the value of the “net.inet.tcp.rfc1323” variable via the sysctl command:

sysctl net.inet.tcp.rfc1323

A value of 1 (output “net.inet.tcp.rfc1323=1”) means scaling is enabled, 0 means “disabled”. If enabled it can be turned off by issuing the command:

sudo sysctl -w net.inet.tcp.rfc1323=0

This setting is lost across a system restart, to make it permanent it must be written in the /etc/sysctl.conf configuration file, that can be accomplished via the command:

echo 'net.inet.tcp.rfc1323=0' | sudo tee -a /etc/sysctl.conf


  Category: OS
  Comments: None

Introduzione e comandi principali di VI

By Zilli,

Ci sono molti editor di testo sui sistemi *nix, ma VI e’ senza dubbio il piu’ diffuso. VI sta per VIsual editor e VIM e’ una versione migliorata di VI. Puoi trovare VI in qualsiasi distribuzione Linux, su Unix e sui sistemi Mac Os X. Per questa ragione occorre impararlo. VIM e’ un editor testuale, percio’ non ci sono tutti i fronzoli tipici degli editor di testo grafici. Ad ogni modo VIM e’ un potente editor di testo. Ci sono tre modalita’ in VI:

1) modalita’ comando
2) modalita’ riga comando
3) modalita input

Per provare VI, apri una finestra di Terminale e digita ‘vi qualcosa’. Non appena si entra in VI ci si trova in modalita’ comando. Per entrare in modalita’ riga comando premi il tasto ‘:’. Per entrare in modalita’ input premi ‘i’ oppure ‘a’. Vediamo una semplice sessione di editing:

1) vi miofile (stai crendo il file miofile)
2) premi ‘a’ per entrare in modalita’ input e digita ‘questo e’ un semplice file di testo’
3) ora premi ‘:’ per entrare in modalita’ riga comando e digita ‘w!’ (con questo comando si scrive il file e si esce da VI)

Puoi spostarti dalla modalita’ input a quella comando o dalla modalita’ riga comando a quella comando premendo il tasto Esc.

Principali comandi in modalita’ comando

  • w -> vai all’inizio della prossima parola
  • b -> vai all’inizio della precedente parola
  • e -> vai alla fine della prossima parola
  • n| -> vai alla colonna ‘n’ della riga corrente
  • $ -> vai alla fine della riga corrente
  • ^ -> vai al primo carattere della riga corrente
  • G -> vai alla fine del file
  • gg -> vai all’inizio del file
  • Gn -> vai alla riga ‘n’ del file
  • i -> modalita’ inserimento (prima del cursore)
  • a -> modalita’ inserimento (dopo il cursore)
  • o -> modalita’ inserimento (sotto la riga corrente)
  • x -> cancella un carattere
  • nx -> cancella ‘n’ caratteri
  • dd -> cancella l’intera riga
  • ndd -> cancella ‘n’ righe
  • yy -> copia la riga corrente
  • p -> incolla la riga copiata
  • Rmiastringa -> sostituisce i prossimi caratteri con la stringa ‘miastringa’
  • /stringa -> trova la prossima stringa ‘stringa’
  • ?stringa -> trova la stringa ‘stringa’ all’indietro
  • n -> ripete la ricerca nuovamente
  • u -> annulla l’ultimo comando

Principali comandi in modalita’ riga comando

  • :w -> scrive il file
  • :w nome_file -> scrive il file come ‘nome_file’
  • :q -> esce da vi
  • :wq -> scrive ed esce dal file
  • :q! -> esce dal file senza salvare
  • :help -> apre il file di aiuto (:q per tornare ad editare il file)
  • :help argomento -> apre il file di aiuto all’argomento specificato da ‘argomento’ (:q per tornare ad editare il file)
  • :rs/stringa1/stringa2/opzioni -> sostituisce stringa1 con stringa2 all’interno del range ‘r’; le opzioni possono essere: g (sostituisce tutto), c (chiede conferma prima di ongi sostituzione)
  • :set number -> imposta la numerazione delle righe

Puoi imparare altri comandi (ce ne sono tantissimi) usando il comando :help. Certo, e’ anche possibile usare il comando ‘man vi’. Il miglior modo per imparare VI e’ iniziare ad usarlo.

Link utili:

  Category: OS
  Comments: None