Show Delete Shared Folder resources On Ubuntu/Linux System

Tuesday, 23. October 2012

A little snippet to show and delete currently shared folders or resources on Ubuntu / Linux machine.

Show Shared folders / resources

net usershare info

Delete Shared folders / resources

net usershare delete <share_name>

Enjoy!

Get Disk and directory Size in linux using shell command

Tuesday, 6. December 2011

Folder size in human readable numbers

$ ls
dir1  dir2
$ du -sh dir1
2.4M  dir1

Disk Space Usage

$ df -kh

Sort Folders By Size

du -H --max-depth=1 /home/ | sort -n -r

Memcache and NGINX – strart and stop services – cheat sheet

Saturday, 3. December 2011

start nginx:

sudo /usr/local/nserver/nginx/sbin/nginx

stop nginx:

sudo kill -HUP $( cat /usr/local/nserver/nginx/nginx.pid )
sudo kill -QUIT $( cat /usr/local/nserver/nginx/nginx.pid )

The master process can handle the following signals:

TERM, INT– Quick shutdown
QUIT– Graceful shutdown
KILL– Halts a stubborn process
HUP– Configuration reload. Start the new worker processes with a new configuration. Gracefully shutdown the old worker processes
USR1– Reopen the log files
USR2– Upgrade Executable on the fly
WINCH– Gracefully shutdown the worker processes

There’s no need to control the worker processes yourself. However, they support some signals, too:

TERM, INT– Quick shutdown
QUIT– Graceful shutdown
USR1– Reopen the log files

Start Memcache:

/usr/local/nserver/memcached/bin/memcached -d -uroot -m512 -p11211 start

Start Memcache:

/usr/local/nserver/memcached/bin/memcached -d -uroot -m512 -p11211 stop

NOTE:
You way want to try: sudo locate ‘memcache’ OR ‘nginx.pid’ in order to locate your paths.