Skip to content

Instantly share code, notes, and snippets.

@francois
Created March 20, 2009 13:06
Show Gist options
  • Select an option

  • Save francois/82354 to your computer and use it in GitHub Desktop.

Select an option

Save francois/82354 to your computer and use it in GitHub Desktop.
$ ls -l db/production.sql.gz
lrwxr-xr-x 1 francois staff 43 20 mar 09:01 db/production.sql.gz -> db/acctsoft-production-20090320-1301.sql.gz
$ rake backup:push
File.file?(db/production.sql.gz) false
$ irb
>> File.file?("db/production.sql.gz")
=> false
>> File.symlink?("db/production.sql.gz")
=> true
>> l = 0; File.open("db/production.sql.gz", "r") {|io| l += io.read(1024)}; puts l
Errno::ENOENT: No such file or directory - db/production.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment