15 Replies - 2379 Views - Last Post: 07 August 2008 - 02:24 PM
#1
operating systems
Posted 27 April 2008 - 12:23 AM
1- Describe each of the following commands: (16 marks)
1. ls -al
2. mkdir -p /home/munir/courses/cs604
3. rm –rf directory1 directory2
4. pwd
5. cp –ir /home/user1/directory1 /home/user2/directory2
6. mv *.c ./cfiles
7. ls –l > list
8. ps fax | less
1. ls -al
2. mkdir -p /home/munir/courses/cs604
3. rm –rf directory1 directory2
4. pwd
5. cp –ir /home/user1/directory1 /home/user2/directory2
6. mv *.c ./cfiles
7. ls –l > list
8. ps fax | less
Replies To: operating systems
#3
Re: operating systems
Posted 29 April 2008 - 10:24 PM
You're just posting questions from your homework, or your test here. Wouldn't it be better to ask your professor for help instead of us?
#5
Re: operating systems
Posted 30 July 2008 - 08:30 AM
The nibbag even included how many marks we can earn
.
#6
Re: operating systems
Posted 30 July 2008 - 08:36 AM
1. This indicates that everything gets selected.
2. This makes Windows delete the selected directory.
3. This remotely stops your liver from working!
4. This indicates that you're stupid and got owned!
5. Control Point! Congratulations, 2 more and you win a match of Warsong Gulch!
6. Moves your entire C partition to a single folder!
7. This disabels lisps from your os' language settings.
8. This adds a post-scriptum that the office can't use the fax device that often.
2. This makes Windows delete the selected directory.
3. This remotely stops your liver from working!
4. This indicates that you're stupid and got owned!
5. Control Point! Congratulations, 2 more and you win a match of Warsong Gulch!
6. Moves your entire C partition to a single folder!
7. This disabels lisps from your os' language settings.
8. This adds a post-scriptum that the office can't use the fax device that often.
#7
Re: operating systems
Posted 31 July 2008 - 03:57 AM
Well it's pretty obvious that these are linux commands, and also that it's been long enough the said thread starter would have finished their homework. So for all those who are waiting with baited breath. The answers are as follows:
1. Lists all files, with all attributes. Similar to dir -a with windows.
2. Creates a directory (although the syntax is incorrect)
It should read: mkdir directory /home/........ etc
Where directory is the folder to be created.
3. Removes an entry, the -rf switches means it will also delete any sub-entries too. Although it will only take wildcards and a single entry, not both directory1 directory2
4. pwd is also used with the wrong syntax.
Used correctly it would state: pwd (user) and allow the users password to be changed.
5. Copy command, similar to windows.
6. Move command, also similar to windows.
7. List command yet again, with different syntax. This syntax does not work with all *nix based systems, but it will check the name of the file system entries and list those that have more characters than list
8. ps fax is the equivalent of Task Manager in windows. Using the less syntax shortens it's outputs to very simple information.
I'm pretty sure that's all of them.
1. Lists all files, with all attributes. Similar to dir -a with windows.
2. Creates a directory (although the syntax is incorrect)
It should read: mkdir directory /home/........ etc
Where directory is the folder to be created.
3. Removes an entry, the -rf switches means it will also delete any sub-entries too. Although it will only take wildcards and a single entry, not both directory1 directory2
4. pwd is also used with the wrong syntax.
Used correctly it would state: pwd (user) and allow the users password to be changed.
5. Copy command, similar to windows.
6. Move command, also similar to windows.
7. List command yet again, with different syntax. This syntax does not work with all *nix based systems, but it will check the name of the file system entries and list those that have more characters than list
8. ps fax is the equivalent of Task Manager in windows. Using the less syntax shortens it's outputs to very simple information.
I'm pretty sure that's all of them.
#8
Re: operating systems
Posted 31 July 2008 - 01:19 PM
DeCompile, on 31 Jul, 2008 - 06:57 AM, said:
2. Creates a directory (although the syntax is incorrect)
It should read: mkdir directory /home/........ etc
Where directory is the folder to be created.
It should read: mkdir directory /home/........ etc
Where directory is the folder to be created.
Nope, it would create the directory cs604, and any directories leading up to it if they don't exist.
DeCompile, on 31 Jul, 2008 - 06:57 AM, said:
3. Removes an entry, the -rf switches means it will also delete any sub-entries too. Although it will only take wildcards and a single entry, not both directory1 directory2
'rm' will take as many arguments as you have memory.
DeCompile, on 31 Jul, 2008 - 06:57 AM, said:
4. pwd is also used with the wrong syntax.
Used correctly it would state: pwd (user) and allow the users password to be changed.
Used correctly it would state: pwd (user) and allow the users password to be changed.
'pwd' prints the working directory, 'passwd' changes the user's password (and the username is optional).
DeCompile, on 31 Jul, 2008 - 06:57 AM, said:
7. List command yet again, with different syntax. This syntax does not work with all *nix based systems, but it will check the name of the file system entries and list those that have more characters than list
Nope, the '>' redirects the output of 'ls -l' to the file named 'list'.
DeCompile, on 31 Jul, 2008 - 06:57 AM, said:
8. ps fax is the equivalent of Task Manager in windows. Using the less syntax shortens it's outputs to very simple information.
Kind of. You got the first part right, but what 'ps' does by default is dump a listing of currently running processes to stdout. The pipe redirects it to the 'less' program, which displays enough to fill the screen and lets the user scroll down.
This post has been edited by Tom9729: 31 July 2008 - 01:23 PM
#9
Re: operating systems
Posted 03 August 2008 - 12:29 PM
dude, just look at man page for each command
#11
Re: operating systems
Posted 03 August 2008 - 03:16 PM
Wow, that really shows my need to refresh my *nix use.
#12
Re: operating systems
Posted 06 August 2008 - 10:38 AM
@ Kirth: users come here for help...not useless/rude/stupid comments...grow up.
#13
Re: operating systems
Posted 06 August 2008 - 10:46 AM
mssbrightside25, on 6 Aug, 2008 - 01:38 PM, said:
@ Kirth: users come here for help...not useless/rude/stupid comments...grow up. 
Actually I would say that despite the immaturity of his response, it is well deserved by the OP.
Feel free to look up his posts. He is basically copying his homework questions, and posting them onto the forum. He doesn't even bother to rephrase the questions, and it's pretty obvious that he's only going to print out the answers and try to hand them in as his own work.
#14
Re: operating systems
Posted 06 August 2008 - 02:20 PM
Well I won't research his posts or anything, I believe you. I just thought it was unnecessary the way he answered.
#15
Re: operating systems
Posted 06 August 2008 - 03:06 PM
Personally I did not approve of the "misinformation" style answer to the post. If I were a moderator in this forum I probably would have remove those posts.
I try very hard not to put false information into my posts, to at least do a basic Google search to ensure my answers are semi-valid. I think it is terrible that someone doing a search may find this thread and be unknowingly mislead or confused by the response.
But that is just my tiny opinion on the matter.
I try very hard not to put false information into my posts, to at least do a basic Google search to ensure my answers are semi-valid. I think it is terrible that someone doing a search may find this thread and be unknowingly mislead or confused by the response.
But that is just my tiny opinion on the matter.

New Topic/Question
Reply



MultiQuote









|