Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Hej
I am having troubles starting superPI benchmark test on Linux. I have it in a file named 'super pi' so ./super_pi doesn't work. I can't figure it out how to do it.
In cmd(Win) I would do it like this
cd C:/super pi/
super_pi
If the file would be located in C:/super pi/
The problem is I somehow can't tell the path to the file.
Aren't you using linux with graphical environment and file manager with gui? It would be way easier. If you want from terminal steps are similar to Windows. Type "cd path" then run with "sh filename" but are you sure that the file you want execute is linux compatible or you are trying run .exe?
hej
thanks..
Well I could not change the directory. The problem is super pi is are 2 words. I renamed it to super and now it works. But how would I move to the directory named super pi or any other with space in the name?
I also get Segmentation fault. I will update all of the drivers and try again.
I renamed it to super and now it works. But how would I move to the directory named super pi or any other with space in the name?
A few ways:
1. Use tab completion. Start typing the name of the directory, hit the TAB key and it should automatically complete (assuming the part you've typed is unique)
2. Escape the spaces with "\", e.g. "cd dir\ with\ spaces".
Also
4.Use * to give anything in that place. For example "cd super*" will pick folder starting with super(case matters!) in name. If you have only one called that way there will be no problem otherwise it may not work and you may need use "cd super*pi" which will take starting super and ending pi.
On tab completion there is also a double tab '<tab><tab>'
where you get a list with only typing the first two letters of the file
if there are similar file names.
You can make an .sh file (see advanced bash) for your convenience.
Or cover-copy/paste a file.
Or an alias.
Also make complete readme notes on what you did and when.
it may not work and you may need use "cd super*pi" which will take starting super and ending pi.
What if you have two folders: "super pi" and "supergfdgghhpi"? It's unlikely, but there will always be the possibility of conflicts when using globs for such a purpose.
By the way, if you use Linux, it's a good idea to avoid putting spaces in filenames since they are a pain to work with in the command line. Use underscores ("_") or dashes ("-") instead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.