Compress the contents of the current directory, but compress the smallest files first (handy when short of disk space for intermediate files):
ls -s | awk NR!=1 | sort -n | awk '{print $2}' | xargs bzip2 -9v
Use 7-Zip and tar together with standard input/output:
tar cf - (directory_path) | 7za a -si -mx=7 directory.tar.7z 7za x -so directory.tar.7z | tar xpf -
Find the largest file in a directory tree:
find /path -type f -exec ls -s {} \; | sort -n | tail -1
Print the number of regular files in each subdirectory of the current directory:
for x in *; do printf "%40s %g\n" $x $(find $x -type f -print | wc -l); done
Print the total bytes of files in a directory grouped by date (useful for Oracle archived log volume summaries):
ls -l|awk 'length($6)==3{x[$6" "$7]+=$5};END{for(i in x)printf"%s:\t%d\n",i,x[i]}'
Burn a CD of the current directory on Linux without an intermediate ISO file (check size with "du -sm ." first; also check "cdrecord -scanbus" for the right device ID):
nice --18 mkisofs -r -T -J -V "Volume Label" . | cdrecord -v fs=6m speed=8 dev=ATA:1,1,0 -eject -
Convert cdparanoia-style tracks to cdda2wav (for cdrecord's useinfo):
x=1;while true;do f=$(printf "track%02g.cdda.wav" $x);[ ! -f $f ] && break;mv $f $(printf "audio_%02g.wav" $x);((x++));done
Burn a DVD with a volume label:
growisofs -Z /dev/cdrom -V "Volume Label" -r -J .
Tell Oracle to let you see the time as well as the date:
alter session set nls_date_format = "RRRR/MM/DD HH24:MI"