|
Q1.
a) List all the files and sub directories of the directory /bin. Ans: The command for listing all the files and sub directories of the directory /bin is “cd bin | ls –l” b) List all the files including hidden files in your current directory. Ans: The command for including all the hidden files in our current directory is “ls -a”. c) List all the files starting with letter ‘r’ in your current directory. Ans: The command for listing all the files starting with letter ‘r’ in your current directory is “ls –al r*” d) List all the files having three characters in their names, from your current directory. Ans: The file having three characters in their names from tha current directory is “ls *abc*”. e) List all the files with extension .doc in your current directory. Ans: The command for listing all the files with extension .doc in your current directory is “ls *.doc”. Q2.
Ans: The command that display the output of ‘who’ and ‘pwd’ commands together is “who ; pwd”. b) Display the system date in following format: Today is Friday, 17 May 12 Ans: echo “Today is” date c) Display the following text message on the monitor screen. Deposited $100 to you account. Ans: echo “Deposited \$100 to you account”. d) Display the following message on the monitor.
Ans: echo “The long listing of my home dir ‘pwd’ is ‘ls –l’ ”. Q3.
Ans: echo “enter the file name that we have to display”
|
|
See Also
Have a Linux Problem
Linux Books
Linux Home: Linux System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|