tags:

views:

94

answers:

4

I'm using ubuntu and I call gedit by using this command:'sudo gedit filename.java'. I'm newbie in ubuntu so now I can not located that file. Ah I'm using windows XP and ubuntu and I have three disk C,D and E in windows XP the fourth disk for ubuntu is not display in windows XP. Can anyone show me where I can find my file? Thank you very much!

+2  A: 

Try looking up the command "find". It will locate files.

Robert
A: 

Type "man find" into the terminal to get a description of how to use the command. But first place I'd look is the home folder. Open up the terminal and type "~" without quotes.

whatWhat
A: 

Open a terminal again ( from where you initially typed sudo ) and type ls -l you have to find it there.

OscarRyz
+1  A: 

The next time you need to find a file and you don't know where it is, just use the locate program included with Ubuntu. Sure, your file most likely won't show up immediately in the slocate database, but it's a really good searcher.

Also, the command line and the run prompt assume that the starting point, that is, the current working directory is always "~" unless you've set it differently. That means that all files and paths are relative to your home folder: /home/username for a user and /root for the root user.

Finally, you do not need to use the sudo command for writing code in your own home directory, and thus you can just stick with gedit filename.java. However, if you ever do need to use a graphical application with root/superuser privileges, use gksu for GTK apps and kdesu for KDE apps. sudo is for when you are running an program or need elevated privileges in a terminal.

Andrew Szeto