Fancy your Linux skills ? Take this challenge and answer these simple 5 questions on Linux Commands.
Update : Added Solutions
Winner : Congratulations to Laxmeesha TV for getting the highest number [ 3 ] of correct solutions.
Update : Added Solutions
Winner : Congratulations to Laxmeesha TV for getting the highest number [ 3 ] of correct solutions.
- Which Linux command would you use to replace all the occurrences of "Computer Science" in the file "subjects.list" with “CS”. Make sure you create a backup of the original file as well.
- What is the command to list all the hidden files of the present working directory ?
- What is the command to list only the first two lines of subjects.list file ?
- Print the contents of subjects.list file in reverse order. [ Hint : Cats have tails ]
- Which Bash command would you issue on a Linux machine to create a coredump of a running program. [ Hint : The flight was aborted due to bad weather ]
Here are the answers I think of..........
ReplyDeleteAns 1: sed s/Computer Science/CS/g subjects.list
Ans 2: ls -la
Ans 3: head -2 subjects.list
Ans 4: tail -`wc -l subjects.list | cut -d ' ' -f 1` subjects.list | tac
Ans 5: ulimit -c unlimited
-Laxmeesh