Showing posts with label Linux tech. Show all posts
Showing posts with label Linux tech. Show all posts

July 17, 2008

Internet anonimo ovvero sicuro

Per chi non lo sappia, provi a cliccare qui per vedere quante cose si possono sapere di chi naviga in rete. La cosa un po' spaventa. Ma c'e' un modo per navigare in modo da nascondere il proprio indirizzo IP, collegandosi casualmente a molti server sparsi nel mondo prima di raggiungere il sito voluto. In questo modo si perdono le tracce del proprio computer, e si diventa anonimi, con un IP casuale nel mondo, e quindi sicuri di non poter essere rintracciati.

Tor e' lo strumento necessario. Ecco quello che ho fatto io per installarlo e farlo funzionare facilmente in Firefox (Iceweasel) in Debian Etch. Qui ci sono le istruzioni per windows o Mac.

1) in Debian Etch Tor non e' disponibile, quindi bisogna attivare i backports di Debian. Per farlo, aggiungere in /etc/apt/sources.list la linea
deb http://www.backports.org/debian etch-backports main contrib non-free
Quindi bisogna aggiornare aptitude, ma prima c'e' da risolvere la questione delle keys, altrimenti aptitude si lamenta. Installando, come root, il pacchetto debian-backports-keyring, tutto viene fatto automaticamente:
# aptitude install debian-backports-keyring

2) Una volta attivati i backports, ho potuto finalmente scaricare tor, insieme al web proxy privoxy, che sara' utile con Firefox.
# aptitude -t etch-backports install tor
# aptitude install privoxy

3) Poi ho configurato privoxy: nel file di configurazione /etc/privoxy/config bisogna:
- scommentare (o aggiungere) la linea
forward-socks4a / 127.0.0.1:9050 . (occhio al punto finale)
- dare il valore 0 (zero) alle seguenti opzioni: enable-remote-toggle , enable-remote-http-toggle , enable-edit-actions
- se non si vuole che privoxy mantenga un file di log, allora commentare le righe: logfile logfile e jarfile jarfile.
Quindi far ripartire privoxy con: # privoxy restart

4) In Firefox (o nel browser scelto) bisogna cambiare le impostazioni di connessione alla rete per attivare Tor . In Firefox (Iceweasel) si trovano in Edit - Preferences - Network - Connections. Quindi bisogna scrivere localhost e 9050 nella sezione "SOCKS Host" (socks v5 ha funzionato per me).
Ma in verita' la cosa migliore e' installare l'add-on di Firefox chiamato Torbutton, con cui in un solo click si possono cambiare le configurazioni necessarie e avere Tor attivato o disattivato. Questo nuovo bottone di firefox funziona egregiamente dopo aver seguito i passi precedenti.

Usando Tor, ogni tanto mi esce fuori google in russo..

June 2, 2008

Typing code in html

When I need to write a code in this blog in html, it's often a pain because the characters "&", ">" and "<" in the code are recognized as html commands. Command sed can help, substituting those characters with their html standards:

sed -e 's/\&/\&#38;/g' -e 's/</\&#60;/g' -e 's/>/\&gt;/g' < OriginalScript.sh > New.sh.html

Than just add around the script the fields <code> </code> and <pre> </pre>

Blast results made easier

#! /bin/bash

#version 0.0...1 !! ..not elegant but works..

#   Blast results made easier.
#   This script extracts the information contained in the .htm page output
#   of Blast (http://www.ncbi.nlm.nih.gov/blast), writing a simpler table
#   in html format, that you can for example load on a spreadsheet
#   (openoffice or excel - if you really want it).
#
#   Usage :
#                ./blast2table INPUT OUTPUT
#   where:
#       INPUT = input file,
#           that must be the .htm saved blast webpage with the results
#       OUTPUT = output file where the table will be saved, in html format.
#           It will have automatically the .html extension
#
#
# Note if this is the FIRST TIME time you use this !
# you need to convert this file into an executable file before running it,
# So the first thing to do is to type:
#
# chmod u+x blast2table.sh
#
# --------------------------------------------------------------------------
# 1001miglia.blogspot.com
# ![[use modify distribute cite]]!



# numero di righe dove compare Accession
grep -n Accession $1 | cut -d: -f1 > grep.1

# numero di samples nella pagina html
ntot=$(grep -n Query= $1 | awk 'END {print NR}')

# nomi dei samples, campo dopo Query= , scritto in file grep.2
awk '/Query=/{print $2}' $1 > grep.2

# trova il campo relativo a Length= e lo manda al file grep.3
grep -A1 Query= $1 | grep Length= | cut -d= -f2 > grep.3

# righe (+2) dove finiscono i titoli di ogni sample (Links), al file grep.4
grep -n Links $1  | cut -d: -f1 > grep.4

# crea il file aaa.tmp.1 e inserisce la prima linea per la tabella html
echo \<table\> > aaa.tmp.1

# riga della prima ripetizione di Accession nel file html :
n1=$(awk 'NR==1' grep.1)

# riga prima ripetizione Links
n1a=$(awk 'NR==1' grep.4)

# taglia via il file html prima della riga n1 e dopo n1a, mette in aaa.tmp.1.
# ci sono i titoli da Accession a Links piu' quelli aggiunti da me Query Length
awk 'NR>='$n1' && (NR<='$n1a'+2)' $1 >> aaa.tmp.1
sed 's/<table>/& <th>Query<\/th><th>Length<\/th>/' <aaa.tmp.1 > aaa.tmp.1a
mv aaa.tmp.1a aaa.tmp.1

# file originale tagliato dopo i primi titoli :
#awk 'NR>'$n1a'' $1 > aaa.tmp.2

  for i in $(seq 1 $ntot)
  do

      #num riga con i-esima ripetizione di Links
      n6=$(awk 'NR=='$i'' grep.4)

      # taglia via dal file html prima di n6
      awk 'NR>'$n6'+2' $1 > aaa.tmp.2

      # num di linea aaa.tmp.2 finisce la prima tabella da cui prendere valori :
      n2=$(grep -n -m1 \</table\>\</div\> aaa.tmp.2 | cut -d: -f1)

      # taglia via aaa.tmp.2 dopo la riga n2
      awk 'NR<'$n2'' aaa.tmp.2 > aaa.tmp.3

      # nome del sample i-esimo:
      n3=$(awk 'NR=='$i'' grep.2)

      echo "Found sample number "$i" , named "$n3

      # length del sample i-esimo :
      n4=$(awk 'NR=='$i'' grep.3)

      # agiunge le righe di query e length :
      sed 's/<td class="l">/<td>'$n3'<\/td><td>'$n4'<\/td>&/' <aaa.tmp.3 >> aaa.tmp.1

  done

# finisce la tabella html
echo \</table\> >> aaa.tmp.1

# output file :
mv aaa.tmp.1 $2.html

rm aaa* grep*

January 18, 2008

Comunicare tra Linux e Windows

Qui in universita' ho un Pc con Linux in un ambiente dove Window$ impera, e la cosa diventa frustante, perche' tutto il lavoro e' basato su programmi proprietari (Mathlab, Autocad, SolidWorks...). E l'universita' ha pagato milioni per avere sulle sue macchine in rete una lista inverosimile (decine e decine) di tali software che poi noi usiamo aumentandone la schiavitu'.
Insomma quando diventa troppo frustrante non averne accesso, ma non si vuole abbandonare il pinguino sul proprio computer, ci sono delle scorciatoie. Quella che a me funziona meglio e' aver installato in Linux rdesktop, pacchetto presente in Debian dovuto, mi hanno spiegato, a un apertura di sorgenti da parte di Microsoft che permettono a linux di entrare in una macchina windows in accesso remoto. Cosi mi connetto a un PC che ha accesso a questi maledetti software, in una finestra di GNOME in cui appare windows in tutto il splendore milionario. (tip: Control+ALT+enter per il full screen).
Da windows poi in dietro a Linux, lo si puo' fare con WinSCP, che permette di scambiare files tra i due.

October 14, 2007

Rete locale (LAN) con debian

Finalmente sono riuscito a creare una piccola e semplice Local Area Network (LAN) a casa, collegando tre computer (due laptop e una torre proveniente dalla spazzatura, due con installato Debian Etch e uno con Ubuntu 6.10 Edgy). Allora qui riassumo il tutto, per aiutare la mia pessima memoria e chiunque altro voglia mettere su facilmente una piccola rete locale a costo bassissimo. Ci ho messo tempo perche' non ho comprato nulla, tutto e' stato trovato o "alleggerito" da surplus buttati in angoli polverosi al lavoro, nessuno ne sente la mancanza diciamo. Per questo le scuole come le piccole organizzazioni con un ufficio e un po' di computer, potrebbero risparmiare molto e guadagnare in efficienza con le reti locali tutte di Linux, anche se poi e' possibile inserire PC "castrati" (Doc definition) con window$. Basti pensare a una classe di scuola per esempio: il PC centrale e' quello del prof, potente e costoso, con memoria e capacita' di calcolo etc.. Tutt'attorno ci sono quelli degli studenti, assolutamente vecchi e inutili altrimenti. Si collegano questi a quello centrale con una LAN, e gli studenti usano il processore del prof per fare qualunque cosa, invece dei loro vecchi e stanchi processori locali. Con un solo buon PC, un HUB o Switch o Router (da 0 a 100 euri) e tanti vecchi PC a costo zero, una classe di informatica e' bell'e sistemata, con un totale di 500 euri o poco piu'. Comunque.


                                                           / PC1 192.168.255.2
 -------------                                            /
|mondo esterno|--modem-------|PC principale|------------HUB---PC2 192.168.255.3
 -------------           eth0              eth1           \
                         dhcp          192.168.255.1       \ PCx 192.168.255.x


Da me il PC torre e' quello principale poiche' e' lui a essere collegato a internet, e distribuisce la connessione a quelli interni tramite masquerading (chiamato anche NAT, Network Address Translation: il provider di internet praticamente non si accorge di tutti i PC dietro il primo che maschera tutti gli altri). Allo stesso tempo serve da firewall per quelli interni, bloccando tutto quello che dal mondo esterno arriva e puo' essere dannoso, e facendo passare solo quello che e' conosciuto e sicuro (almeno si spera). Il firewall e' essenzialmente iptables, software potente quanto complicato che guida il Kernel del sistema nel decidere che fare dei pacchetti che arrivano alle schede di rete, ma (grande consiglio da Doc) reso molto piu' semplice da firehol, che crea configurazioni complicate per iptables a partire da un linguaggio molto piu' semplice.

Questo PC ha quindi due schede di rete ethernet (vecchissime e sempre dalla spazzatura, non c'e' bisogno di comprare nulla), con cavi RJ45 (trovati chissa' dove). Una (eth0) collegata al modem che collega al mondo esterno, e l'altra (eth1) alla rete interna. La rete interna e' messa insieme da un vecchissimo HUB 10T (rubato anche lui dalla spazzatura al lavoro, il mio miglior negozio di informatica per il momento), che praticamente mette in comunicazione i cavi a lui attaccati, senza nessun'altra operazione sui pacchetti (cosa che un router invece fa), ma davvero ora che tutto funziona non vedo perche' spendere soldi per un router visto che non noto rallentamenti (dipende dal bassissimo numero di PC allacciati credo). Quindi il PC centrale e' collegato da una parte al mondo esterno, dall'altra al HUB, a cui sono attaccati tutti i PC della rete locale. Entrambe le schede di rete del PC torre sono state automaticamente detettate da Debian e subito funzionanti, previa modifica del file /etc/network/interfaces. Nel PC torre questo file e' cosi:
 # The loopback network interface:
 auto lo
 iface lo inet loopback
 
 # To exernal world:
 auto eth0
 iface eth0 inet dhcp
 
 # To internal LAN:
 auto eth1
 iface eth1 inet static
 address 192.168.255.1
 netmask 255.255.255.0
 network 192.168.255.0
 broadcast 192.168.255.255
Per la rete locale il suo numero IP e' 192.168.255.1 (uno degli indirizzi IP che si possono senza problemi usare nelle reti locali), nella scheda eth1. Dal provider di internet invece prendera' un numero IP dinamicamente (dhcp) per la scheda eth0. Tutti gli alri PC all'interno della LAN hanno il file /etc/network/interfaces molto simile, ma con solo una scheda di rete configurata staticamente, un diverso IP number, e con un gateway indicato. Il gateway e' il PC a cui collegarsi per uscire nel mondo esterno, quindi per loro e' la torre 192.168.255.1 . Quindi per il secondo PC dentro la LAN, il file e' questo:
 # The loopback network interface:
 auto lo
 iface lo inet loopback
 
 # To internal LAN:
 auto eth1
 iface eth1 inet static
 address 192.168.255.2 
 netmask 255.255.255.0
 network 192.168.255.0
 broadcast 192.168.255.255
 gateway 192.168.255.1
Per il terzo PC, invece, solo "address" cambia in 192.168.255.3 e cosi' via per altri PC se ce ne fossero (192.168.255.x). Una volta che questi files sono stati cambiati, bisogna far ripartire la rete nei PC, con il comando /etc/init.d/networking restart oppure ifup --force eth1 (se la scheda relativa a quel computer e' eth1).

Se non fosse per il firewall ancora da configurare sul PC principale "torre", e forse firewalls negli alri PC, fino a qui la rete locale e' settata e tutto dovrebbe funzionare all'interno della LAN. E' possibile fare ping o ssh da un computer all'altro della LAN, per esempio. Per settare il firewall del PC principale, quindi firehol e' un ottimo strumento. Con aptitude install firehol lo si installa immediatamente. Per averlo caricato di default bisogna cambiare il file /etc/default/firehol in modo da avere la linea
 START_FIREHOL=YES
Quindi bisogna passare al suo file di configurazione /etc/firehol/firehol.conf. Sul linguaggio da utilizzare, non troppo complicato, qui si trova un ottimo tutorial. Il file sul mio PC principale e' il seguente:
 version 5
 
 interface eth0 internet
 policy reject
 protection strong
 server ssh accept
 server ping accept
 client ssh accept
 client http accept
 client https accept
 client ping accept
 client dns accept
 client ftp accept
 
 interface eth1 home
 policy reject
 server http accept
 server ssh accept
 server ping accept
 server dhcp accept
 server https accept
 server dns accept
 server ntp accept
 client ssh accept
 client ping accept
 
 router home2internet inface eth1 outface eth0
 masquerade
 route all accept
 
 router internet2home inface eth0 outface eth1
Nella prima parte si danno preferenze per eth0, cioe' la connessione col mondo esterno ("internet"). Nella seconda con la rete di casa ("home") su eth1. Di default tutto e' bloccato ("policy reject"), salvo quello specificato nelle linee successive, in cui alcuni programmi sono autorizzati (ssh, ping, http, https, ftp...). Nella parte "router home2internet inface eth1 outface eth0" e' indicato il passaggio dall'interno (LAN) all'esterno, con le relative interfaccie (eth0, eth1). Con la semplice linea "masquerading", si dice di voler il masquerading attivo. Nella successiva parte "router internet2home inface eth0 outface eth1", non essendoci nulla, si blocca il traffico da internet all'interno della LAN (il firewall). Finalmente, per far partire firehol, basta il comando #/etc/init.d/firehol start.

Aggiornamento, un'ultima cosa
Se proprio nella LAN interna si deve mettere un PC con windows (qui Vista), bisogna dare al PC un indirizzo IP fisso, mentre di default funziona normalmente quello fornito dinamicamente dal provider (DHCP). Per farlo:
Control Panel >> Network and Internet >> Network connections.
Right click su Local Area Connection >> Properties.
Left Click su Internet protocol Version 4,
click sul bottone Properties.
Selezionare Use the following IP address: (invece di Obtain an IP automatically).
Inserire gli indirizzi negli spazi. Nel mio caso (vedi sopra):
IP address: 192.168.255.3
Subnet mask: 255.255.255.0
Default gateway: 192.168.255.1
Quindi per il server DSN (quello che capisce l'indirizzo del computer o sito che si vuol visitare fuori in rete esterna), selezionare sotto Use the following DNS server address:.
Qui ho inserito l'indirizzo o gli indirizzi IP xxx.xxx.xxx.xx che si trovano nel PC gateway, che fa da porta al mondo esterno tramite masquerading, nel file /etc/resolv.conf.
Se poi si torna in ufficio, o un altro posto dove windows deve funzionare con IP dinamico (DHCP), allora si deve cambiare il tutto di nuovo, selezionando semplicemente nelle Properties i due bottoni Obtain an IP address automatically e Obtain DNS server address automatically

October 5, 2007

Manipulating text file in bash

Here I post the script I wrote in bash to help a guy working in biology. He needed to modify stuff inside a preatty long text file. Doing it by hand is what he is used to do, but it's too hard. As this is the first time I do something like that, this script is for sure not effective, slow, not elegant and with many many works-around. Any suggestion will be very appreciated. The file is a . gb, coming from a huge biological database. It is divided in may similar repeated parts, like this:

LOCUS ABC_123 923 bp DNA linear ENV 20-MAY-2007
DEFINITION Uncultured bacterium clone P4T_321 16S ribosomal RNA gene, partial sequence.
ACCESSION XYZ123051
VERSION EF552051.1 GI:146575907
KEYWORDS ENV.
SOURCE uncultured bacterium
ORGANISM uncultured bacterium
Bacteria; environmental samples.
1 gctttgcaag tcgggtgttg aaatccccag gcttaacctg ggaactgcat tcgagactgc
61 attgctagag tatgggagag ggaagtggaa tttcaggtgt agcggtgaaa tgcgtagata
121 tctgaaggaa catcagtggc gaaagcgact tcctgggcca atactgacgc tcatgtgcga
181 aggcgtgggg agcaaacagg attagatacc ctggtagtcc acgccataaa cgatgagaac
241 tggatgtcgg gagggtctgc ctctcggtgt cgtagctaac gcgttaagtt ctccgcctgg
(...)

LOCUS XYZ_345 764 bp DNA linear ENV 20-MAY-2007
DEFINITION Uncultured bacterium clone P4T_200 16S ribosomal RNA gene, partial sequence.
ACCESSION XY123050
VERSION XY12350.1 GI:146575906
KEYWORDS ENV.
SOURCE uncultured bacterium
ORGANISM uncultured bacterium
Bacteria; environmental samples.
REFERENCE 1 (bases 1 to 764)
(...)


What he needed was to replace the word after LOCUS with the word in the following line after clone (the name of a bactrium probably), and that for every occurrence of the patterns in the file. For example the first line would change in:

LOCUS P4T_321 923 bp DNA linear ENV 20-MAY-2007
DEFINITION Uncultured bacterium clone P4T_321 16S ribosomal RNA gene, partial


The idea is to find all the lines where "LOCUS" appers, and write their numbers in a file. These numbers will be used by awk and sed to substitute the fileds. This substitution is done in a for loop. Here first the corrected line is written to stout (sed -n '...s/.../p'). Then the lines down to the next line with "LOCUS" are printed. The last occurrence of the pattern "LOCUS" gave problem, so I had to insert the variable m (the number of line with "LOCUS") and compare it to the length of the input file.
This is the script:

#! /bin/bash

# Syntax:
# ./chtitle input_file > output_file

# Changes ,in the input_file, all the titles after the field "LOCUS" 
# (like P4T_321) with the ones found one line below in the 
# field "DEFINITION".
# In the script, "$1" is the input_file to change.

# finds all words "LOCUS" in file $1, and print num.lines where it finds them:
grep -n "LOCUS" $1 | cut -d: -f1 > qqq.temp

# totlines = total number of lines in $1 
totlines=$(awk 'END{print NR}' $1)

k=1;

# moves "i" in qqq.temp, where num. of lines with "LOCUS" are stored:
for i in $(cat qqq.temp); 
do  
    # "title" = string to move, in the line after "LOCUS":
    title=$(awk 'NR=='$i'+1{print $5}' $1); 

    # substitutes the word after "LOCUS" with "title", and prints the line:
    sed -n ''$i's/\(LOCUS\) [  ]* \([a-zA-Z0-9_]*\)/\1       '$title'/p' $1;

    # m = in qqq.temp, the numb. of the next line with "LOCUS":
    m=$(awk 'NR=='$k'+1{print $0}' qqq.temp);

    # len = how many characters form m? if 0 => it's the last:
    len=${#m};

    # if length(m) = 0 => give m the value "n":
    if [ "$len" -eq 0 ]; then m=n; fi 

    # echo ==== i=$i m=$m lenm=$len ===;
 
    # prints all the lines down to the next "LOCUS"
    awk 'BEGIN{ii='$i'; mm='$m'; if (mm==n) mm='$totlines'} NR>ii &&
    NR<mm {print $0}' $1; 

    k=$k+1;
done

rm qqq.temp


Update : incredible improvement from Doc:
"I am sure any perl user could do better, but I gave it a try anyway. If the files are well behaved (that is, there is always one and only one line containing "clone" after a line containing "locus" before a new "locus" is encountered), I think this works (otherwise, let me know!):
$ tac original_file | awk '{if ($4 == "clone") {tmp=$5}; if ($1 == "LOCUS"){$2=tmp};print $0}' | tac > modified_file

"

September 28, 2007

ssh tunneling

I have a PC at home and one at work (both with Debian Etch). I like to have them connected, to share files easily. But a firewall is set at work, the result is that I can connect (with ssh) from work to home, but not from home to work. The only solution the administrator suggested to me was annoying as connect to a third PC that allowed the comunication from home to work. This meant copy twice every file from home to work.

A better solution is ssh tunneling. It is pretty easy: it worked just running this command in my PC at work:

ssh -R remote_port:localhost:22 home_computer

(where remote_port is the number of a port (like 2048), and home_computer is the IP address of the PC at home). And then, from home, I can connect to work with the following:

ssh -p 2048 localhost

If remote_port was chosen 2048, as before.
If the file file.home needs to be transfered from home to (~) at work, then scp also works fine:

scp -P 2048 file.home localhost:~

Linux's simply great.

REF.
brandonhutchinson.com
zg.mpg.de

September 21, 2007

Rename files in Bash

Some examples how I renamed easily many files:

Say that you have the following files:

pipp.1
pipp.2
...

that need to be changed to:

PPP_1
PPP_2
...

This can be done by the following command:

for i in $(ls pipp*); do a=$(echo $i | cut -d'.' -f2); echo $a; mv $i PPP_$a; done


Second example: you want to remove the "_" from the beginning of the name of the files

_img000336.bmp
...
_img000337.bmp


This can be done by:

for i in `seq 336 599`; do mv _img000$i.bmp img000$i.bmp ;done


Third example : from the files named

01author.mp3
02author.mp3
...

to

author01.mp3
author02.mp3
...

This can be done by:

for i in $(ls); do b=$(echo $i | cut -c 1,2); mv $i author$b.mp3; done

September 13, 2007

Doc contribution: Using awk

I comment a contribution came from far away (Doc):
I wanted to see just a part of some data in a file, ascii data, otherwise it doesn't work. Let's create a simple data file with bash:

for i in `seq 1 1000`; do echo -n $i " "; echo "$i*$i" | bc ; done > dati.txt

[which means for i in the sequence (seq) from 1 to 1000 (the ` are important), do the following: send to output or print (echo), without a new line (-n), the value of the variable i ($i), then a space (" "), then (;) send to output (echo) the value of i squared ("$i*$i"), but bash is not able to do that, so the $i*$i must be sent (|, which is pipe) to another program, in this case bc, a simple calculator. Once everything is done, send the result to the file (>) called dati.txt]
So, we have a file with two columns, one with the numbers from 1 to 1000, the second with these numbers squared. The order is not relevant. Now, I want to see only the data where the first column ends with 5 AND the second column is between 2000 and 3000:

awk '{if ($1 ~ /5$/ && $2 > 2000 && $2 < 3000) print $1, $2}' dati.txt
45 2025

[(that's more difficult for me) This calls the powerful program awk, in its form awk 'ProgramText' file. The $1 and $2 are the first and second field found in the file dati.txt, the first and second number of each line. So, awk prints out (print) $1 and $2 if the condition ($1 ~ /5$/ && $2 > 2000 && $2 < 3000) is matched (true). This condition is formed by three conditions connected with a logical AND (&&): the first condition [$1 ~ /5$/] means that the first field $1 (the first number) must match (~) a string with 5 at the end (5$) [if for example the 5 needed to be at the beginning, it would be 5^]; the second ($2>2000) and third ($2<3000) condition say that the second field ($2) must be between 2000 and 3000.

September 10, 2007

mount samba file system

In Debian per montare un filesystem window$ (a volte capita), ho usato il comando mount con opzione per un samba file system:

mount -t smbfs -o username=xxx,password=yyy //remote_server/where/here /mnt/local_directory

dove l'opzione -t smbfs indica il samba file system, xxx e yyy sono l'autentificazione dell'utente (se necessaria) che purtroppo rimangono in chiaro nella trasmissione, e potrebbero essere rubate. La directory locale /mnt/local_directory deve essere creata precedentemente (semplicemente con mkdir /mnt/local_directory)