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.
I've always had a permissions problem in most flavors of Linux (esp. Mint) I've used. I can set the permissions in root, but after exiting, my next action fails because for some reason the system reverts to the original set of permissions.
Now I've discovered the problem includes shell files. I can set up a shell file, save & close, then open the file again and the text is still there. Right. But when I try to run it, it stops at the >. I open the file to check it, and it's blank. Chmod doesn't work either.
I think you need to give an example of what you are doing. If you have a file in your /home/user directory named filename and you change to that directory in a terminal and run: sudo chmod 755 filename you should have given everyone execute permission for that file.
I'm not sure I understand the part below:
Quote:
I can set up a shell file, save & close, then open the file again and the text is still there
If you write a shell script and save it, why would you not expect the text to be there?
How are you trying to run these scripts?
Are you using bash? something else?
I was trying to run the ''version-check.sh' from the Linux From Scratch book. I followed the directions on the link above, but it doesn't work. At this time I can't cut/paste from a PDF, so I found the HTML version of the LFS book online and setup the file from there.
If you can copy and paste from the terminal, it would be helpful to show a command prompt session illustrating what is happening. After creating any files, their content could be shown with the cat command.
Classic technician's syndrome. No explanation available.
jafo21369@jafo21369-desktop ~ $ chmod 755 version-check.sh
jafo21369@jafo21369-desktop ~ $ ./version-check.sh
bash, version 4.1.5(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.20.1-system.20100303
./version-check.sh: line 9: bison: command not found
yacc not found
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
./version-check.sh: line 17: gawk: command not found
/usr/bin/awk -> /usr/bin/mawk
./version-check.sh: line 21: gcc: command not found
GNU C Library (Ubuntu EGLIBC 2.11.1-0ubuntu7.2) stable release version 2.11.1
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.32-22-generic (buildd@rothera) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010
./version-check.sh: line 26: m4: command not found
GNU Make 3.81
./version-check.sh: line 28: patch: command not found
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
./version-check.sh: line 32: makeinfo: command not found
Texinfo:
./version-check.sh: line 33: xz: command not found
./version-check.sh: line 34: gcc: command not found
Compilation failed
*****************
At least now I know what to do next. Thanks to those who responded.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.