Question

In: Computer Science

a) Observe the following Linux commands and work out what each command does: 1) $ ls...

a) Observe the following Linux commands and work out what each command does:

1) $ ls –al

2) $ /etc/profile

3) $ chmod 200 final_assignment.txt

b) Consider a scenario where Bob has downloaded his messages to the local machine with an access of

POP3, he can create mail folders and move the downloaded messages into the folders. Bob can then

delete messages, move messages across folders, and search for messages (by sender name or subject).

But this paradigm—namely, folders and messages in the local machine—poses a problem for the nomadic

user, who would prefer to maintain a folder hierarchy on a remote server that can be accessed from any

computer. This is not possible with POP3—the POP3 protocol does not provide any means for a user to

create remote folders and assign messages to folders. Which protocol can be used in this given scenario

so that messages can be accessed from anywhere from the same inbox account? Justify your answer with

the aid of a diagram.

Solutions

Expert Solution

Solution:

a)

1. Command : ls -al

ls command is used to display the contents of the current working directory. when it is used with extra options the behaviour will be different.

-a : This option is used to display all the files in the directory including the hidden files. Hidden files are the ones which has names atarting with a period.

-l : This option is used to display the long list of the files. Using this command we can see the permissions, file owner , size , modification time and file name.

So, ls -al command is used to display a long listing of all the files ( including the files that starts with . ) .

2. Command : /etc/profile

The file /etc/profile  contains the information about system wide environment variables and startup programs. This file is used by the shell programs like BASH ( Bourne Again Shell ) , KSH ( Korn Shell) and SH. It is generally used to setup environment variables like PATH , user limits ( we can limit the system resources used by user ) and settings for the user.

3. Command : chmod 200  final_assignment.txt

chmod command is used to change/modify the permisions of a file based on the given argument.

So, in the above command the argument is 200

when digits of  200 is represented in binary.

So the above table we can see that command sets the file permissions to -w- --- -- i.e only write permission for user.The table shows how the argument 200 is interpreted as permissions.

I hope this would help....................:-))


Related Solutions

Questions: Explain the following Linux commands Show your work examples/outcome. 1. command used to locate /Home/...
Questions: Explain the following Linux commands Show your work examples/outcome. 1. command used to locate /Home/ Directory…show the outcome 2. command used for October 2020 3. mv command and cat command 4. commands used- move to parent directory? 5. Explain why command is used ls -R?   What is the meaning of -R ? 6. Explain and describe two examples of how the touch command. 7. Explain what is the outcome of the commands ls -C ? 8. Explain command echo....
Look up and use each of these Linux commands. (Each command will have two parts) Summarize...
Look up and use each of these Linux commands. (Each command will have two parts) Summarize their function then use the command Use the Command and document the output (<parameters of your choice> Command Function info cat Demonstrate 'cat' in use   man cp Demonstrate 'cp' in use   man touch Demonstrate 'touch' in use   man mv Demonstrate 'mv' in use   man rm Demonstrate 'rm' in use   info wc Demonstrate 'wc' in use   man find Demonstrate 'find' in use   man chmod Demonstrate...
linux Using the grep or egrep commands, what would be the full command (including regular expression)...
linux Using the grep or egrep commands, what would be the full command (including regular expression) to view only the lines in the file /boot/grub/grub.cfg that DO NOT begin with a hashtag (the # sign). In other words, what would be the command to print all the lines in this file that do not begin with this character.
Systems Programming in Linux using C Remake the version of the ls -ialR command in C.....
Systems Programming in Linux using C Remake the version of the ls -ialR command in C.. In this version of ls, you must also consider symbolic file types. Make sure you have file header comments and function header comments. Also, write inline comments whenever necessary.
I need to combine two programs that can do the following (a) what ls command does...
I need to combine two programs that can do the following (a) what ls command does and (b) to check each file name to print its content if its name has ".lst" extension. These are the two programs Program - 1 /* * simple-ls.c * Extremely low-power ls clone. * ./simple-ls . */ #include <sys/types.h> #include <dirent.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { DIR *dp; struct dirent *dirp; if (argc != 2) { fprintf(stderr, "usage: %s...
Operating Systems class Complete the following work with Linux commands and submit the screenshot. 1.Install a...
Operating Systems class Complete the following work with Linux commands and submit the screenshot. 1.Install a virtual machine with Lubuntu 2.Log in and display the content of your home directory 3.Create a directory called homework under your home directory and navigate to homework directory 4.Create a file called newfile under homework directory (this can be done by Leafpad) 5.Copy the file newfile to tempfile, then rename tempfile to myfile and delete newfile 6.Display the content of myfile
Use linux Original question: d) Use metacharacters and the ls -lL command (with lower and upper...
Use linux Original question: d) Use metacharacters and the ls -lL command (with lower and upper case L) to list all filenames under the datafiles directory that contain a dot '.' with the letter 'f' or 'u' anywhere after the dot. e) Use metacharacters and a single ls -lL command (with lower and upper case L) to listall file names that contain a dot '.' followed by a lower case letter, then end with the letter 't' or 'r' as...
Given the Linux shell command descriptions, please write down the corresponding shell commands in a terminal...
Given the Linux shell command descriptions, please write down the corresponding shell commands in a terminal window.             a) list the current directory contents with the long format             b) print the name of the working directory             c) change directory to the root directory             d) change the permissions of file "myfile" (owned by yourself) so that (1)you can read/write, but cannot execute; (2) all other users cannot read/write/execute this file.             e) make a new directory called “mydir”
the Unix/Linux commands Enter the “date” command to print the current date and time. Also, try...
the Unix/Linux commands Enter the “date” command to print the current date and time. Also, try the “cal” command. Enter the command “clear” to clear the screen. Use the command “cat .bash_hisrtory” to view your startup file. Note that each shell has a different startup file, and since we’re using the BASH (Bourne-Again Shell), the startup file is .bash_history. (if you can’t find this file think about one way to display!) Enter the “exit” command to close the terminal window....
Linux operation 1. Explain what this command does: rpm –qai | more ..... ? 2. Ps...
Linux operation 1. Explain what this command does: rpm –qai | more ..... ? 2. Ps – Af |grep -v ^root, Explain how this command to find application processes could helpful in the real world to the system administrator?? 3. Clearly describe 3 valid command options, and their meaning, of this command used to add users? 4. List 2 different variants of the Unix (not Linux) operating system, as well as their corresponding vendor (the company that developed them) ?...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT