- The indexed way: locate -i process.txt (run sudo updatedb to update indexes but Ubuntu update it everyday via cron ).
- Or search with find . -iname 'process.txt' -print if it is in the current folder.
- You can change it to find / -iname 'process.txt' -print to search from root.
public static void writeFile2() throws IOException { FileWriter fw = new FileWriter("out.txt"); for (int i = 0; i < 10; i++) { fw.write("something"); } fw.close(); }