/dev/random

Collection of Useful Oneliners

Here comes my personal collection of oneliners. I hope it will grow with time.

  • Download all files recursively in a directory listing with wget:
    wget -m --no-parent http://example.com/path/to/files/
    
  • Find all files and open them in Vim
    find /path/to/directory -name '*.rb' -exec vim '{}' +
    
  • Create sparse files
    dd if=/dev/zero of=sparse.file bs=1 count=0 seek=4G
    # or
    truncate -s 4G sparse.file