Home
6.
You have a file that you want to randomize its lines and create permutations of it for distinctive file list, how can you create a permutation of the file "myfile" into "mynewfile"?

The Linux tool shuf allows you to create permutations of file and shuffle the lines, which will allow you to create new distinctive files - shuf myfile > mynewfile.

7.
You have moved a file from one server to another, but you are not sure that the file has been perfectly moved, how can you verify that the file has not been corrupted?

You can use the md5sum tool on both sides (both servers) on the file and match the result, if it is the same, the file has not been corrupted.

8.
How would you copy the file "file.txt" owned by root using secure ftp from 10.1.1.1 on /root/ to your local folder in one command?

You need to use the scp tool (secure copy over sftp) which allows copying in one line scp root@10.1.1.1:/root/file.txt ./

9.
How will you change all the ownership of /home/user1 to user2 (recursively)?

You need to use the chown command on the directory - chown user2:user2 /home/user1 –R.

10.
How can you check how long is the system running since the last restart and the load average on it?

The uptime command can show you the current time, how long the system has been running since the last restart, how many users are currently logged on to the system, and the system load averages in the resolution of the last 1, 5, and 15 minutes.