rigadicomando.org

Whatever you can cat

Secondary links

  • About
  • Contacts
  • Disclaimer

fabio's blog

Unlimited Loop

Submitted by fabio on Fri, 2006-02-10 14:22.
  • bash

Generate an infinite loop in the shell

while true ; do date ; sleep 5 ; done

"Leggi Argomenti" template per script

Submitted by fabio on Tue, 2006-01-31 13:55.
  • bash
  • scripts

Template per script che legge argomenti da riga di comando:


#!/bin/bash

# FUNCTIONS

function help () {
cat < Command: `basename $0`
Syntax: `basename $0` [ -h ]
Description: Descrizione script
Options: -h help (questo help)
-a Opzione "A"
-b Opzione "B"
EOF
}

# VARIABILI

# OPZIONI

while getopts ha:b: var
do
case $var in
h) help; exit
;;
a) echo "Opzione "-a" con argomento $OPTARG";
;;
b) echo "Opzione "-b" con argomento $OPTARG";
esac
done
shift ` expr $OPTIND - 1 `

  • Read more

fuser + proc

Submitted by fabio on Tue, 2006-01-10 15:54.

Path completo dell'eseguibile che sta occupando una determinata
porta con un determinato protocollo

cat /proc/`fuser -n $2 $1 | gawk \'{}{printf\"%s\\n\",$2}{}\'`/cmdline && echo -e \"\\n\"

Whoix

Questo sulla mia Debian non gira ... mi sono permesso di modificarlo un po':

cat /proc/`fuser -n tcp 80|gawk {'print $2'}`/cmdline && echo

Fabio

passless users

Submitted by fabio on Tue, 2006-01-10 15:52.
  • bash

Volete vedere quali utenti nel vostro sistema NON hanno una password?

cat /etc/passwd |cut -f1,2 -d:| grep -v :x |cut -f1 -d:

Whoix

indice html per immagini

Submitted by fabio on Tue, 2006-01-10 15:50.
  • bash

Questa riga di comando genera una pagina html con link a immagini senza troppi patemi d'animo e senza troppi drag&drop :)
In pratica genera un file html definito nella variabile FILE che contiene l'elenco
delle immagini jpg presenti nella directory corrente, aggiungendo come titolo la directory
in cui ci sono le immagini e la data della generazione del documento.

blinking@X-Treme:~/foto_marte > ls -Altr
total 1030
-rw-r--r-- 1 blinking users 210036 Dec 21 1999 Image001.jpg
-rw-r--r-- 1 blinking users 243192 Dec 21 1999 Image002.jpg
-rw-r--r-- 1 blinking users 230380 Dec 21 1999 Image003.jpg
-rw-r--r-- 1 blinking users 293860 Dec 21 1999 Image004.jpg
-rw-r--r-- 1 blinking users 67652 Dec 21 1999 Image005.jpg

export FILE=page.html;echo "
Index of `pwd` Content of directory `pwd`

" >$FILE; for d in *.jpg; do echo ""$d"
">>$FILE;done;echo "

Page last modified on `date`
">>$FILE

  • Read more
123next ›last »

Navigation

  • Feedback
  • News aggregator

ICT users' rights

  • New Documentary Film "Patent Absurdity: how software patents broke the system"
  • Time for nonprofits to leave proprietary fundraising software systems behind
  • Breaking the dependency on proprietary software: A call to nonprofits to refuse Microsoft Windows 7
  • Why is free software important to you? Submit your response to our new video campaign!
  • FSF works with PayPal to the benefit of the free software community
more

High Scalability Architecture

  • The cost of High Availability (HA) with Oracle
  • Strategy: Order Two Mediums Instead of Two Smalls and the EC2 Buffet
  • Hot Scalability Links for April 16, 2010
  • Parallel Information Retrieval and Other Search Engine Goodness
  • Strategy: Saving Your Butt With Deferred Deletes
more

Debian Security

  • DSA-2038 pidgin
  • DSA-2037 kdm (kdebase)
  • DSA-2036 jasper
  • DSA-2035 apache2
  • DSA-2034 phpmyadmin
more

Drupal Security

  • SA-CORE-2010-001 - Drupal core - Multiple vulnerabilities
more

EFF

  • Congress Must Investigate Electronic Searches at U.S. Borders
  • Betrayed MSN Music Customers Deserve More from Microsoft
  • EFF Report: FBI Slowed Terror Investigation with Improper NSL Request
  • State Secrets Claim Should Not Bury Important Surveillance Lawsuit
  • Courtroom Showdown for eBay Seller Over Promo CD Sales
more

Invent Geek

  • The Meeting Light Project
  • the ion cooler 2.0
  • the ultimate dance pad v1.0
  • The Thermaltake MiniFridge Case Mod
  • Inventgeek gets a facelift and a butt tuck
more

 Privacy | Disclaimer | Drupal | Creative Commons

All content on this site is ditributed under Creative Commons License, each individual author is responsible for its own posts.

RoopleTheme