O_WRONLY | O_CREAT | O_TRUNC O_WRONLY : open for writing but not for reading. O_CREAT : if the file doesn't exist, create it. You will need to declare permission bits (0644). O_TRUNC : If the file does exist, delete it, then recreate it. A shorter file.ish file after running it the first time. Link files. Links can be hard links or symbolic links. I prefer symbolic links. A link is when you have two pathnames for the same file. If you change the file with one name, the file with the other name changes as well. The symbolic link points to another filename, but not to the contents of the file. There is only one link to the file itself. My symbolic link is only to the fileNAME of the original file. On a LINUX system, you cannot make a hard link to a directory. Hint: Programmers are stupid. Let's say I have a directory called A, and in that directory is a directory called B. And B has hard link called A my original directory A. ./A is a valid pathname. ./A/B ./A/B/A ./A/B/A/B ./A/B/A/B/A etc etc are all valid pathnames. However, you can have symbolic links to folders, and if you're not careful, you can still get ./A/B/A/B/A/B/A/B...