This is a code-golf question. You need to take the contents of two separate files (i.txt and o.txt) and swap them. You can create a third file to help you with the process, but have your program delete it after the file contents are swapped. Renaming the files is now allowed again.
Programs must work for any file content.
Shortest code wins, all eligible submissions will be up-voted.
inode
s the goal here would be fori.txt
'sinode
to contain the data fromo.txt
'sinode
, and vice versa, so that if there are hardlinks to thoseinode
s elsewhere, their contents will appear swapped as well. Renaming can't accomplish that. \$\endgroup\$ – AJMansfield May 11 '14 at 3:07