Skip to main content
29
results
Andrew Fletcher
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 -lThis 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 find <directory> -type f | wc -lThis command only...
Andrew Fletcher
I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4...
Andrew Fletcher
Recently I have been investigating one of my Linux server's speed using the...
Andrew Fletcher
I had generated a backup of key directories on the server - see Create a...
Andrew Fletcher
Currently, I have a situation where I have two repositories.  The first is...
Andrew Fletcher
Creating a bash script Bash scripts are files containing code that tell your computer to do something.  In this instance, I want to rename a batch files in a directory.  Such as changing:   37351001 - BlueSpotted.jpg 37351008 -SpangledEmporer _ 0133A.jpg 37353003 -Black-Bream_3481 .jpg 37353004   -35 - Yellowfin.jpgInstead having these files appear as: 37351001.jpg 37351008.jpg 37353003.jpg 37353004.jpgHowever, I don't have four files.  Wouldn't be worth my time...
Andrew Fletcher
Accessing a remote server using PEM key, and I had the following...
Andrew Fletcher
Trying to have a chat recently, and Microsoft Teams would not open on MAC OS....
Andrew Fletcher
How do you generate a .pem file from an existing .ppk key? Is putty on your...
Andrew Fletcher
Currently I'm working through an app that has been abandoned by the developers....
Andrew Fletcher
First off, this isn't the only method to achieve the outcome of emptying a file. Using a symbol : is a shell built-in command that is essence equivalent to the true command and it can be used as a no-op (no operation).  It can be used as follows: # : > filename.txtOR  # true > filename.txt  My initial file was as follows: 21548342 16 Mar 20:27 code.logPost using the command  : > filename.txtThe response was  0 16 Mar 20:27...
Andrew Fletcher
Clear DNS Cache The DNS (Domain Name Service) cache on your Mac helps browsers...
Andrew Fletcher
Changing git push from passphrase?  There are several ways to tackle this...
Andrew Fletcher
  Z shell (Zsh) is a Unix shell built on top of bash (the default shell for...