Problem: Getting error mount: unknown filesystem type ‘exfat’ when inserting USB flash drive to USB port using Fedora Core 20
Solution:
Execute the following commands:
wget
rpm -ivh fuse-exfat-1.0.1-1.fc20.x86_64.rpm
Re-Insert Device
Problem: Getting error mount: unknown filesystem type ‘exfat’ when inserting USB flash drive to USB port using Fedora Core 20
Solution:
Execute the following commands:
wget
rpm -ivh fuse-exfat-1.0.1-1.fc20.x86_64.rpm
Re-Insert Device
Edit /etc/bashrc using
vim /etc/bashrc
add your alias to the file, for example if ll should be the alias for ls -l then add
alias ll="ls -l"
to /etc/bashrc and save the file.
For changes to take immediate effect execute the following command:
. ~/.bashrc
Use the uname -m command within the Terminal.
uname -m
The above command displays the Machine Hardware Name and indicates whether your system is 32-Bit or 64-Bit.
If your system is 64-Bit then the output will be x86_64 and for 32-Bit the output will be either i686 or i386
Open the Terminal Window
Download the Installation file using the wget command
wget
Install the deb package
sudo dpkg -i unifi-video_3.1.1~Ubuntu14.04_amd64.deb; sudo apt-get install -f
Open a new Browser Window and type in replacing <IP> with the NVR IP address to initiate the setup process.
Open the Terminal Window
Execute the following command to install the Ubuntu Desktop
sudo apt-get --install-recommends install ubuntu-desktop
mount -t cifs -o username=YOURUSERNAME,password=YOUPASSWORD //server_name_or_ip/folder_to_mount /mnt/folder_to_mount_to/ By using the above command and by replacing the relevant fields with your details, you should be able to mount your Samba Share on Linux Explanation: mount = mounts a filesystem -t = Used to indicate the filesystem type, in this case cifs cifs = Common Internet Filesystem...
Edit /etc/logwatch/conf/logwatch.conf and override the TmpDir value by changing the default temp directory to /tmp from /var/cache/logwatch
/tmp automatically gets trimmed by most Linux distributions meaning that there won’t be a built up of old log files.
Now delete the old files in /var/cache/logwatch using the command below:
rm -rf /var/cache/logwatch/*
Use the gpasswd command. The gpasswd command is used to administer /etc/group, and /etc/gshadow.
Use to following command:
sudo gpasswd -d user group
Replace user with the user you wish to remove and group with the group. The -doption is to remove the user from the named group.
Run the below command to see the contents of the archive without extracting.
tar -tf archive.tar
The option -t will list the file contents and -f refers to the file archive.
Edit the .bash_profile file in your home directory
vi ~/.bash_profile
Add the following lines to your .bash_profile file
export VISUAL=vim
export EDITOR="$VISUAL"
Note: Replace vim with any other preferred editor such as nano
Logout and login again for changes to take effect.
If you want the changes to come into play immediately, execute the following command
. ~/.bash_profile
Open a new Terminal Window Type the following command replacing IPADDRESSTOBLOCK with the IP Address that you wish to block. iptables -A INPUT -s IPADDRESSTOBLOCK -j DROP Explanation of above command: -A = Append one or more rules to the end of the selected chain -s = Source, in this case the IP address to block -j = This indicates what to do if the rule matches Save the Rule to the IPTables...
Open a new Terminal Window
Type in the following command and press enter:
sudo dpkg-reconfigure tzdata
Select your Geographical Area and select OK
Select your Time zone and select Ok
Your new Time zone is set, type in the Date command to confirm.
Open a new Terminal Window
Type in the command
java -version
The output should look similar to the below:
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-3)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
The above code indicates that you are running Java SDK version 7 on your server
Open a new Terminal Window Execute the following command: sudo update-alternatives --config java Output similar to the below will show: There are 4 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1092 auto mode * 1 /usr/lib/jvm/java-7-openjdk...
Open a new Terminal Window and type the following command:
du -shc folderPath
Explanation of the du command:
du - estimate file space usage
-s, --summarize, display only a total for each argument
-h, --human-readable, print sizes in human readable format (e.g., 1K 234M 2G)
-c, --total, produce a grand total
Replace folderPath with the folder to check the size on.
Create a new Bash Shell Script eg. loopThroughArray.sh Open the Script with an Editor eg. GEdit Add the array definition through which the script should iterate array=( one two three four five ) The expression ${array[@]} contains all values within the array ${array[@]} Now we create a for loop to iterate through the array for num in ${array[@]} do echo $num done Once...
if [ -z "$VARIABLE" ]
If $VARIABLE is not set or empty the if statement above will return true, the -z option tests for a zero-length string, so whether $VARIABLE is not set or empty the ifstatement will return true
for i in $(cat myFile.txt); do echo $i; done
The above code executes a for loop and then echo’s out each line in the file myFile.txt
for fileName in $(ls)
do
echo $fileName
done
or a one liner
for fileName in $(ls); do echo $fileName; done
Replace the ls command with any Linux command