#!/bin/sh
#CCCP script by hampa@chello.se
#lista all files from all users
#if there is to many users on the hub.. crashing of dctc have
#been known to happen 
#this version will not run the outputter in the background

#some info first
echo "INFO: this command will output all files from all users."
echo "if it is a big hub it could possibly be more than a million files"
echo "the result will both be saved to listall2.log and send to stdout"
echo "hit enter to start or CTRL-c to quit"

read


#now send the LIST command to all users
cccp -N -u | xargs -n1 -exec cccp -O -l 2> /dev/null

#get all output save to listall2.log and output to stdout
cccp -N -o | grep "FLST ]" | tee listall2.log 


