ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You specified tha path for the output file (-o option), but not for the source file.
If you want your compiled program in the source folder, your command should look like this:
The question mark matches 0 or 1 of any character.
And to the OP: Why do you have a directory called My Documents (not to mention the fact that it's a bad idea to have spaces in filenames in Linux)? You should be storing things right in your home directory. Forget about the Windows way.
Just for clarification: If you have a name of a file/folder that contains spaces the correct way would be to escape the spaces, in your way the command to change the name of your 'My Documents' folder should be
Code:
mv My\ Documents MyDocuments
The code you are using (My?Documents) would also match folders like MycDocuments, My1Documents and so on.
No not all, mostly used for word processor documents...
Why are you storing source code, then? I hope you're not editing it with a word processor (especially with all the great text editors available, including gedit, kate, vim, etc.).
I generally use Kedit, Kwrite or VI to do the editing of the source file.
Being a newbie I would need time to try some of the others you suggest.
Thanks
GEdit is just bretty basic, but has syntax highlighting.
Kate (my favorite for now) is basically KWrite but with support for multiple documents, split windows, and the abitily to have plugins. Plugins are available for compiling and finding errors, debugging your program, etc.. It can also be made to act like Vi.
Thanks, yes VI is a pain in the neck that's why I've been using something Kwrite or Kedit.
I'll look into Gedit.
If you use KWrite, then I'd more strongly suggest that you look at Kate. I think it's better for seroius programmers because even though it's just a simple multi-document text editor at its core, it comes with lots of programming-oriented plugins that can pretty much turn it into a fully functional, minimalistic IDE.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.