LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-09-2015, 09:43 AM   #1
learnlinuxvn
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Rep: Reputation: Disabled
Help me with write program linux


1. Write a program that displays a list of the subdirectories of a directory
- $ Subdir path
- List the subdirectory located in the path.
2.
Write a program that searches files in one folder 1 ( but not in folders
alcohol)
- $ Search path ten_tep
 
Old 12-09-2015, 09:49 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
we will gladly help you, but will not write that (homework?) for you. What have you done so far, where did you stuck?
 
Old 12-09-2015, 09:50 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,362

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
Quote:
Originally Posted by learnlinuxvn View Post
1. Write a program that displays a list of the subdirectories of a directory
- $ Subdir path
- List the subdirectory located in the path.
2.
Write a program that searches files in one folder 1 ( but not in folders
alcohol)
- $ Search path ten_tep
No

YOU do your homework and ask us specific problems when you run into trouble. Do not post homework questions verbatim and expect us to do your work for you. This is the third post in a row where you've done that.
 
Old 12-09-2015, 09:50 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,688

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
I will write them for you, 100 Euro a piece. Which language?

Or you start writing, and if it doesn't work or you hit a brick wall, describe your problem, and I and many others will help for free.

See also the LQ Rules http://www.linuxquestions.org/linux/rules.html, especially the part about homework:

Quote:
Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
 
Old 12-09-2015, 03:16 PM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,116

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
This isn't even requesting a program - its requesting a command be made into a program. Also, not sure what the second request even means.

Code:
read -p "What directory do you want to list the subdirectories of: " directory;
find $directory -type d;
 
Old 12-09-2015, 03:48 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,336

Rep: Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896Reputation: 3896
Quote:
Originally Posted by szboardstretcher View Post
This isn't even requesting a program - its requesting a command be made into a program. Also, not sure what the second request even means.
Code:
read -p "What directory do you want to list the subdirectories of: " directory;
find $directory -type d;
The OP posted three threads similar to this. All of them asking for blatant handouts/homework.
 
Old 12-09-2015, 07:11 PM   #7
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,288
Blog Entries: 2

Rep: Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939Reputation: 939
Post LOL

Read a book and you know what that book said. Now rewriting that book or telling it's topic (in your own words) is a different story...
http://www.linuxquestions.org/questi...4/#post5049376
 
Old 12-09-2015, 08:31 PM   #8
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,122

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by berndbausch View Post
I will write them for you, 100 Euro a piece. Which language?

Or you start writing, and if it doesn't work or you hit a brick wall, describe your problem, and I and many others will help for free.

See also the LQ Rules http://www.linuxquestions.org/linux/rules.html, especially the part about homework:
100 Euro per character? Hmm..good business.. LOL..

Homework link reference (for a start): http://www.unix.com/shell-programmin...directory.html

Try to do things yourself if you bump somewhere then shout for help. Shortcut will get you nowhere. Study and learn.

Last edited by JJJCR; 12-09-2015 at 08:41 PM. Reason: edit
 
Old 12-10-2015, 08:56 AM   #9
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,484
Blog Entries: 10

Rep: Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643
@OP Please check this link Welcome to LQ
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write a program to record audio in linux using c stephenwalter Programming 3 07-09-2012 08:20 PM
How can I write a C program or customize my Linux environment so... beckettisdogg Linux - Newbie 1 09-23-2009 08:23 PM
how to write a c-program in vector linux bluewing_linux Linux - Newbie 2 05-20-2008 11:25 AM


All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration