Computer scienceSystem administration and DevOpsCommand lineCommand line basics

Command line overview

Working with files and directories

Report a typo

You go to a job interview at a company where they sit you down at a computer with a Unix operating system. You are asked to perform the following tasks:

  • Display the username of the currently logged-in user;

  • List non-hidden files in the current directory;

  • View all files (including hidden files) in the /var/lib/ directory;

Fill in the blanks below with the commands you'd use, specifying the path if necessary.

Fill in the gaps with the relevant elements

to display the username of the currently logged-in user;

to list non-hidden files in the current directory;

to view all files in the /var/lib/ directory;

Create a free account to access the full topic