$ cat file.txt | grep -v "#" | grep -v "^$"
After creating a basic jail do this:
Step 1 Configue the the Jail to Use SSH
Step 2 – Setup Apache, MySQL and PHP – NOTE: Make changes for your version of PHP
with minor changes from
Step 3 – install workpress
1) create a local git repo
$ git init
1.5) Save username and password for github
$ git config credential.helper store
$ git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>
2) Add all the files in the currect folder
$ git add *
3) Commit the files/changes
$ git commit -m "first commit"
4) Add the remote repo
$ git remote add github https://github-url
5) Push the local repo to the remote repo
$ git push --set-upstream github master
After adding files for making changes
6) add newfile.txt to local git repo
$ git add newfile.txt
7) commit the changes (adding the new file / or if you’ve updated files)
$ git commit -m "added update script"
8) push the changes to github
$ git push --set-upstream github master
— How to undo chanages BEFORE A COMMIT —-
Use this command to see which files have changed
$ git diff
Then use the checkout command to replace the file with the changes you want to undo
$ git checkout <filename>
NOTE : this needs to happen BEFORE you do a commit.
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Go to https://extensions.gnome.org and install the browser extension.
Use firefox, not chrome, chrome goes haywire when you install the browser extension
Then look for the following extensions and install them.
- Dash to Panel
see original article here:
Find and replace text within a file using sed
The procedure to change the text in files under Linux/Unix using sed:
- Use Stream EDitor (sed) as follows:
- sed -i 's/old-text/new-text/g' input.txt
- The s is the substitute command of sed for find and replace
- It tells sed to find all occurrences of ‘old-text’ and replace with ‘new-text’ in a file named input.txt
- Verify that file has been updated:
- more input.txt
Resetting the Root Password of RHEL-8
1) Break the boot sequence by adding ‘rd.break’ at kernel stanza in grub. To do this, restart your system and when the GRUB splash screen comes:
- Select/highlight the kernel you wish to boot using the up/down arrow keys.
- Press the e key to edit the entry.
- Select/highlight the line starting with the word kernel or linux.
- Press the e key to edit the line.
- Add ‘rd.break’ at the end.
- Press ENTER to accept the changes.
- Press the ‘ctrl + x’ key to boot the kernel with the modified command line.
2) The system will provide a shell which will be from initramfs:
. . Entering emergency mode. Exit the shell to continue. Type "journalctl" to view system logs. You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot after mounting them and attach it to a bug report. switch_root:/#
3) Root filesystem will be mounted read-only at ‘sysroot’ directory:
switch_root:/# mount | grep -i sysroot /dev/mapper/rhel-root on /sysroot type xfs (ro,relatime,attr2,inode64,noquota)
4) Remount it with read-write mode:
switch_root:/# mount -o remount,rw /sysroot
5) Chroot into it:
switch_root:/# chroot /sysroot/
6) Change the password:
sh-4.4# passwd Changing password for user root. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully.
7) Relabel the filesystem:
sh-4.4# touch /.autorelabel
8) Exit from the shell:
sh-4.4# exit exit switch_root:/# switch_root:/# exit
9) The system will continue the paused booting sequence:
. Starting Relabel all filesystems... [ OK ] Started Manage Sound Card St localhost login:
Remove CTRL-M characters from a file in UNIX
1) Open the file in vi
2) Type the following
3) Press enter
to the ^M you have to type CTRL+V and then CTRL+M
I just had this same issue today and came across your post.
The reason mine crashed was because the plugin i was importing was huge (about 10GB in size).
–What i ended up having to do was manually create a dataset. Im using plex as an example.
zfs create zpool/iocage/jails/Plex
or use the GUI
–Then unzip the file that you got from your export. I unzipped it to the iocage/images folder. you should have two files, one the same name as the zip file and one with _root added to the name.
–Next i had to import the data from the unzipped files.
zfs recv -F zroot/iocage/jails/plex < plex_2019-10-30
zfs recv -F zroot/iocage/jails/plex/root < plex_2019-10-30_root
Once you do this then you should see it in freenas in the jails section. It came up as if nothing had ever happened for me. Hope this helps anyone else that came across this.
as i was also changing pools i had to edit the fstab file in the jails/<jail> directory
Hard Drive Burn-in Testing
THIS TEST WILL DESTROY ANY DATA ON THE DISK SO ONLY RUN THIS ON A NEW DISK WITHOUT DATA ON IT OR BACK UP ANY DATA FIRST
1) Run a short test
# smartctl -t short /dev/sdb
2) Run a conveyance test ???
# smartctl -t conveyance /dev/sdb
3) Run a long test
# smartctl -t long /dev/sdb
4) Run badblocks
# badblocks -ws /dev/sdb