LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Listing the average file size for all subfolders (+listing subfolders without ls or find)

Posted 08-03-2014 at 08:11 PM by the dsc (linux-related notes)
Updated 08-03-2014 at 09:04 PM by the dsc

A tiny "Frankenstein monster" one liner, adding a little bit from several sources/blogs/blog comments:

lsf | while read d ; do find ./"$d" -iname "*.*" -type f -printf "%k\n" | gawk '{sum += $1; n++;} END {print sum/n;}' |sed "s|$| -- $d|" ; done | sort -n

Where the first "command", "lsf" is actually a custom function:

Code:
lsf ()
{
for f in * ; do [ -d "$f" ] &&
...
Member
Posted in Uncategorized
Views 100 Comments 0 the dsc is offline
Old

Cat Silliness

Posted 08-02-2014 at 01:17 PM by ttk (Unpopular Positions: One Geek's Take)

Who'd have thunk it? Simon, our laid-back happy-go-lucky orange kitty, is a scrapper!

Since we moved to this property in 2008, our cats have been hemmed in by the territories of cats from the surrounding neighborhood. If they ventured too far from the house, sometimes while still on the property, they'd get their asses kicked.

Sam, our big grey tomcat, held the other cats' territories out on the periphery for a couple of years, but he'd come out on the losing end of...
ttk
Member
Posted in Reflection
Views 165 Comments 4 ttk is offline
Old

Exton|OS 64 bit with Mate 1.6.2 :: Now based on Ubuntu 14.04.1 LTS released 140725

Posted 08-02-2014 at 04:54 AM by exton (Exton's Blog)

Exton|OS build 140801 is based on Ubuntu 14.04.1 LTS 64 bit (released July 25, 2014) and Debian Jessie. Exton|OS’s ISO file is a ISO-hybrid, which means that it can very easily be transferred (copied) to an USB pen drive. You can then even run Exton|OS from the USB stick and save all your system changes on the stick. I.e. you will enjoy persistence! I’ve found two scripts which make the installation to USB very simple. The scripts are quite ingenious. My tests show that they work flawlessly on USB...
ExTiX Admin
Views 71 Comments 0 exton is offline
Old

Implementation of file transferring by using sockets c on Linux.

Posted 08-01-2014 at 09:10 PM by 915086731

Code for file sending.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h> 
#include <pthread.h>


#define SOCKET_PORT "50000"
#define TRANSFER_SIZE 2048

unsigned long int count = 0;

void error(const
...
Member
Posted in Uncategorized
Views 106 Comments 0 915086731 is offline
Old

Banana Pi Cluster

Posted 08-01-2014 at 11:13 AM by Pyplate

A few days ago I launched a new site called Banoffee Pi Server. It's running on a cluster of four Banana Pi servers running Nginx. I built the site with Pyplate CMS, a Python CMS that I wrote myself.

I built the web site on one server, and I used rsync to connect to the other servers over ssh and synchronize them. Pyplate generates static pages when caching is enabled. On this site every page can be cached, so there's no need to synchronize the entire CMS and database, just the...
LQ Newbie
Posted in Uncategorized
Views 123 Comments 0 Pyplate is offline

  



All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration