Vk 35 kotitehtävät 3

All global settings are in text files in directory /etc or its subdirectories. Find in which files is the name of the computer defined. Write the full command in your report.

The previous command gives many error messages. How can you change the command so that
error messages are not shown? Write the full command in your report.

–sudo find /etc -name “hostname”
Find out in which files in /etc (or its subdirectories) contain word ubuntu. Make a case insensitive search. Write the full command in your report.

-sudo grep -i -r ubuntu /etc/*
Find all files with name README in directory /usr. Write the full command in your report.

-sudo find /usr -type f -name “README”
ls /usr/bin lists the contents of the directory. How can you find out how many files (and
subdirectories) are there in /usr/bin? Write the full command in your report.

– sudo ls -L /usr/bin | wc -l

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s