Reply
Thread Tools
Posts: 95 | Thanked: 19 times | Joined on Dec 2009 @ Mexico, Monterrey.
#1
Hello people, I have been trying to run a script for some time, and so far I haven't been lucky. I have already investigated about this issue I'm having, and I only found the next things.

1.- Need to gain root (sudo gainroot, works on my n900).
2.- the scripts that I want to run as executables must not be on MyDocs, since it is a VFat Partition (done, moved my files to /Home/User/ and /Home/User/X/





Can somebody tell me what I'm doing wrong? (I'm new to linux, but I want to learn)
 
Ralph's Avatar
Posts: 14 | Thanked: 10 times | Joined on Jan 2010 @ Italy
#2
You have an extra space between + and x.
Try chmod +x move-to-opt.sh
 

The Following User Says Thank You to Ralph For This Useful Post:
rm42's Avatar
Posts: 963 | Thanked: 626 times | Joined on Sep 2009 @ Connecticut, USA
#3
There are several things you are doing wrong. Where to beguin?

- You shouldn't have a space between + and x.
- cd means "change directory. So, why are you trying to cd into x?
- Make sure the file is where you think it is first using the ls command.

- See this post for a mini command line tutorial:
http://talk.maemo.org/showthread.php...337#post535337
__________________
-- Worse than not knowing is not wanting to know! --

http://temporaryland.wordpress.com/
 

The Following User Says Thank You to rm42 For This Useful Post:
Posts: 82 | Thanked: 44 times | Joined on Feb 2010
#4
It looks like the first attempt (the second line) in the last screenshot worked - if you type:

ls -l

you will see whether or not it is executable.

You should see something like:

Code:
Nokia-N900-42-11:~# ls -l
-rw-r--r--    1 root     root            0 Mar 11 21:16 move-to-opt.sh
Nokia-N900-42-11:~# chmod +x test
Nokia-N900-42-11:~# ls -l
-rwxr-xr-x    1 root     root            0 Mar 11 21:16 move-to-opt.sh
Nokia-N900-42-11:~#
To help with your learning, the permissions can be chunked as follows:

- rwx r-x r-x

I won't go into too much deal (a google search will tell you everything), but the first '-' means it's a normal file (d would be a directory), then the next three groups represent permissions.

Group 1 = user permissions
Group 2 = group permissions
Group 3 = public/world/anonymous permissions

the first letter is read permissions. r=yes, -=no
the second is write permissions. w=yes, -=no
the third is execute permissions. x=yes, -=no

so in this example, the user can read, write and execute.
other users in the same group as this user can read and execute
and any user can read and execute

(note: In practice, on the n900, multi user and groups aren't really used)

Hope that helps!

Ben
 

The Following 2 Users Say Thank You to benh_n900 For This Useful Post:
Posts: 95 | Thanked: 19 times | Joined on Dec 2009 @ Mexico, Monterrey.
#5
Thanks everyone. One last question, I have made everything from before, but when I use the command " ./move-to-opt.sh " the terminal returns the next message "/bin/sh: move-to-opt.sh: not found"
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#6
Are you in the right directory?
You can do the ls -l command as above to see if move-to-opt.sh is in your current directory. If not you'll need to use cd to change directory first.
 
blwthompson's Avatar
Posts: 97 | Thanked: 8 times | Joined on Dec 2009
#7
hey what is that program in the first screenshot?
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:38.