Saturday, 20 October 2012

File Sharing

Linux File Sharing Using Twistd:--------
 
To share your directory with others on your network or even on the internet, you can use the twisted tool to share your folders.

Twisted is a python based tool, you need rpms like python-twisted-core, pyOpenSSL, python-zope-interface to install the too.

You can make use of the RPMforge rpm repo on yum to install the tool on your server or destop easily.

Sharing your folder on the web


# yum install python-twisted-core

# yum install python-twisted-web

$ twistd web --path /home/ --p 8081 &

Then go to browser and run
  http://192.168.1.183:8081/

To kill or end the twistd, use.

# killall -9 twistd

The above will start a web server on port 8081 sharing your /home directory. You can use http://<server-ip>:8081 to get the full list of /home directory on your web browser.

Sharing your folder on FTP

Similar to HTTP you can also use ftp protocol to start sharing. Just execute.

# twistd -n ftp -r /home/ &

This will start the ftp service on the default port 2121, you can use your ftp client on port 2121 to connect with your server.

Clear the cache from memory

How to clear the cache from memory in Linux:--

Yeah, you are so confused about the cached memory. Your memory is reduced to low and you are worried about that. The only thing in your mind now is to reboot your server. Don't worry about this. Just use this command.

sync; echo 3 > /proc/sys/vm/drop_caches
Hope it helps you.

Example:--

[root@www html]# free -m
total    used    free shared    buffers cached
Mem:   2023    1243     779   0     271     619
-/+ buffers/cache:     352    1670
Swap: 4023   0    4023
[root@www html]# sync; echo 3 > /proc/sys/vm/drop_caches
[root@www html]# free -m
total    used    free shared    buffers cached
Mem:   2023     300    1723   0   1 59
-/+ buffers/cache:     239    1783
Swap: 4023   0    4023

Configure EKS Persistent Static Storage With Elastic File System Using Terraform

  checkout :https://youtu.be/QuUIgQWBBZM