Skip to main content

How to create list of files that is recursive and output as txt file?

This issue

I have a folder with about 10,000 files in it.  I want to scan through the directories and isolate files that are different from what sits in the database.  How do you generate a list of file names of all the files into a single txt file?

 

how to solve - git response 'not something we can merge'

I'm in an environment where the default branch is staging and I'm attempting to run a git merge.  However, in actioning this command, I'm been greeted with the following response 'not something we can merge'

❯ git merge origin/{branch}
merge: origin/{branch} - not something we can merge

To resolve this, first I attempted to do a git checkout to the branch

Show the favicon in bootstrap barrio sub theme

Having a situation where I'm running a sub theme based on Bootstrap Barrio, but I want to be able to see the favicon in the sub theme.  Like many situations, once you know where to look the solution is quite simple.  Yet the path of discovery can take time.

In hunting down a solution, I looked into the theme settings yaml file.  But to no avail.

 

Count the number of files in a directory including recursively

How to count the number of files in a directory.  At some point you'll have a directory or directories that you need to know the number of files in them.  On Linux, the list command (ls) is piped with the wc -l command.

ls | wc -l

This command works great if all the files are located in one directory.  What about if you have multiple directories.  Then you will need to use the find command piped with the wc command

/usr/bin/env: 'php\r': No such file or directory

Running Docker, I deleted the images and containers they had been built to date.  Time to refresh the environment and see what works and what isn't working.  This action was a result of the dev environment failing to load.

 

Current versions

The PHP version is 8.1.12 apache 2.4.54-bullseye

Composer response

Composer versions 2.4.4 2022-10-27 14:39:29

PHP response

mysql dump FLUSH TABLES access denied

I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4 to 8.1.  However, when I've attempted to export the MySQL database using the command

drush sql-dump --extra-dump=--no-tablespaces --result-file=../sql/db-2023-02-25.sql

I seeing the following response

Subscribe to