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.
Hello Friends,
I am new to this forum. I am currently in school learning linux and need to write a script that will do the following: (Any help will be greatly appreciated)
I need to create a shell script called Delstar that will accept input, and check to see if the input is a directory file and is readable and writeable. If so, then all ordinary files under that directory should be listed out one by one. For each ordinary file that is writeable, the user should be asked whether or not the file is to be deleted. If the file is to be deleted then it should be deleted and the next file processed. If the file is not to be deleted then it should just move to the next file.
Thanks in advance for any help given. I just can't seem to get my head around this one. Jaz.
please do not ask for help with your homework. The point of going to school / college is to learn things, not to just blindly cop someone elses work. Say someone decides to take pitty on you and gives you a full example. you copy that and hand it in.. what do you learn from that? Would you seriously take the time to read through it and teach yourself how it does it's thing? The course you are doing this for should come complete with substantial notes, of text references for you to be able to acomplish any task set within it.
I do apologize if it seemed like I am looking for someone to do my work for me. This is not the case. I am more looking for an approach to the problem not the entire script written for me. I have tried several different things to make this work and am having no success.
Here's a hint -- look at the "test" command, assuming this is to be written in a shell script. If you're doing this in C, the stat function will help you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.