Freebsd Mount a NAS via SMB / CIFS

To mount a NAS (Network-Attached Storage) device via SMB/CIFS in FreeBSD, you can use the mount_smbfs command. Here are the steps: Install the Samba client software if it is not already installed: pkg install net/samba44 Create a mount point for the NAS share: mkdir /mnt/nas Mount the NAS share using the mount_smbfs command, specifying the … Read more

Bash Clear DNS Cache

In Bash, you can clear the DNS cache by flushing the system resolver cache. Here are the steps to clear the DNS cache in Bash: Open a terminal window and type the following command to clear the cache: sudo systemd-resolve –flush-caches This command will flush the DNS cache and any other caches that may be … Read more

Applescript: Run or Call a Shell Script

To run or call a shell script from AppleScript, you can use the do shell script command. Here’s an example: set myScriptPath to “/path/to/my/script.sh” do shell script myScriptPath In this example, the myScriptPath variable contains the path to the shell script that you want to run. The do shell script command then executes the script. … Read more

How To: Rename A File In Bash

To rename a file in Bash, you can use the mv command, which is used to move and rename files. Here’s the basic syntax: mv old_filename new_filename For example, to rename a file named “file.txt” to “new_file.txt”, you can use the following command: mv file.txt new_file.txt This will rename the file “file.txt” to “new_file.txt” in … Read more