- Article pages now have a discussion option at the bottom (moderated/captcha, but no registration needed)
- recently upgraded to a newer Dokuwiki version, please report problems
- snipplet:
- files,
- file size
- LastUpdate:
- 2010-07-31
- Contributor:
- Frank Lazzarini
- type:
- snipplet
This is a simple snippet to echo the size of a file in bytes.
#!/bin/bash
FILENAME=/home/heiko/dummy/packages.txt
FILESIZE=$(wc -c < "$FILENAME")
# non standard way (GNU stat): FILESIZE=$(stat -c%s "$FILENAME")
echo "Size of $FILENAME = $FILESIZE bytes."
Discussion