I have one Linux question that I can't solve. I tried to solve it - I also tried to search the forum, but found no clue - or a way to solve it.
Write commands that count the amount of files in the Vegetables and Fruits folders together. The answer must be saved in a CounterFood file. Several commands are allowed.
After you execute these commands you are prompted to do so:
The total number of characters in the names of the files in the Vegetables and Fruits folders must be added to the CounterFood file. Several commands may be used.
I thought about doing an arithmetic insert - but I didn't find such a command.
ls -l . Vegetables Fruits | egrep -c '^-' >> CounterFood
I tried to count how many files there were - but I couldn't count the two folders together. Then I came up with this - my idea is to access the folders - and find all the files - and then count them
find Vegetables Fruits -type f | wc - >>CounterFood
The continuation of the question is directly related to the beginning. But the beginning didn't work out for me - I can't understand why.