You need to list all files in the current directory including hidden files, sorted by size in human-readable format. Which command achieves this?

DM Revision

Quiz
•
Computers
•
University
•
Medium
box lem
Used 4+ times
FREE Resource
36 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
ls -lSah
ls -aSlh
ls -lsha
ls -lahS
Answer explanation
These commands will all produce the same result: listing all files in the current directory, including hidden files, sorted by size, in a human-readable format.
So, any of the provided options will work correctly. However, typically the order -aSlh (or any permutation of these options) is preferred for readability.
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the result of the following command sequence in UNIX?
grep "error" log.txt | sort | uniq -c | tee error_summary.txt | head -5
Finds the first 5 unique error messages in log.txt and saves the output to error_summary.txt
Counts and lists the first 5 unique lines containing "error" from log.txt and saves the output to error_summary.txt
Displays the first 5 unique error messages from log.txt and does not save the output
Finds, counts, sorts unique error messages from log.txt, saves the output to error_summary.txt, and displays the first 5 lines
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
You have a directory named project with multiple files. How would you recursively change the permissions so that the owner can read, write, and execute, and everyone else can only read and execute?
chmod -R 755 project
chmod -R 744 project
chmod -R 751 project
chmod -R 711 project
4.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Given the following tables:
Employees(emp_id, emp_name, dept_id)
Departments(dept_id, dept_name)
Salaries(emp_id, salary)
Which SQL query retrieves the department name and the total salary for each department?
SELECT d.dept_name, SUM(s.salary) FROM Departments d INNER JOIN Employees e ON d.dept_id = e.dept_id INNER JOIN Salaries s ON e.emp_id = s.emp_id GROUP BY d.dept_name
SELECT dept_name, SUM(salary) FROM Employees e INNER JOIN Departments d ON e.dept_id = d.dept_id INNER JOIN Salaries s ON e.emp_id = s.emp_id
SELECT d.dept_name, s.salary FROM Departments d JOIN Employees e ON d.dept_id = e.dept_id JOIN Salaries s ON e.emp_id = s.emp_id
SELECT d.dept_name, SUM(s.salary) FROM Departments d, Employees e, Salaries s WHERE d.dept_id = e.dept_id AND e.emp_id = s.emp_id GROUP BY d.dept_name
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which XPath expression selects the titles of all books?
//book/title
//library/book[@title]
//book[@title]
//library//title
6.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
In a database, a relation R(A, B, C, D) is in 3NF if it meets which of the following criteria?
(choose up to 2 answers)
For every non-trivial functional dependency A -> B, A is a superkey
There are no transitive dependencies in the relation
Every attribute is functionally dependent on the primary key
7.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of the following statements about CAP theorem in NoSQL databases is true?
It is possible to achieve all three: Consistency, Availability, and Partition Tolerance simultaneously
In the presence of a network partition, one has to choose between consistency and availability
CAP theorem applies only to SQL databases
CAP theorem ensures that a distributed database is always consistent
Create a free account and access millions of resources
Similar Resources on Wayground
35 questions
Elektronika_PHP_MySQL

Quiz
•
12th Grade - University
40 questions
Containerisation and Cloud

Quiz
•
University
36 questions
STP e RSTP

Quiz
•
University
40 questions
Soal Latihan UNBK TKJ

Quiz
•
University
31 questions
N5 High Priority

Quiz
•
12th Grade - University
31 questions
Scripting Unit 7 and 8 Practical Revision

Quiz
•
University
40 questions
HTML

Quiz
•
University
40 questions
A4ALGU CLUB EVENT QUIZ

Quiz
•
University
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade