Wednesday, November 29, 2023

Unable to see #shared #folders in #Ubuntu in #Vmware #VirtualMachine

Make sure you have enabled the shared folder in vmware settings as follows:

Vmware ubuntu shared folder

Run following command on terminal:

sudo mkdir -p /mnt/hgfs/
sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs/ -o subtype=vmhgfs-fuse,allow_other

Open /etc/fstab 

sudo vim /etc/fstab

 

Add following line at end of the file(Be carefull while modifying system files, always create a backup copy before modifying it)

vmhgfs-fuse   /mnt/hgfs    fuse    defaults,allow_other    0    0

Then run command 

sudo mount -a


For more detils you can visit: 


What is the difference between `` $() and ${} in shell programming linux?



In shell scripting on Linux (or Unix-like systems), both `` `...` `` (backticks) and `${}` are used for different purposes.

1. --Backticks: `` `...` `` or `$(...)`:--

   - They're used for command substitution in shell scripts. Whatever is enclosed within backticks or within `$(...)` will be treated as a command and the output of that command will replace the backticks or `$()`.

   - For instance:

     ```bash

     current_date=`date +%Y-%m-%d`

     # or

     current_date=$(date +%Y-%m-%d)

     ```

     Both of these lines will store the current date in the `current_date` variable using command substitution.

2. --Curly Braces with Variables: `${var}` or `$var`:--

   - They're used for variable expansion and manipulation. `${}` is used to explicitly denote the boundaries of a variable name. This allows for more precise variable identification in certain cases and also enables performing operations on the variable value.

   - For example:

     ```bash

     var=10

     echo "Value of var is ${var}"

     ```

     This prints the value of the `var` variable enclosed within curly braces.

The main difference lies in their purposes: backticks or `$()` for command substitution, while `${}` for variable expansion and manipulation. The use of `${}` can also allow for additional functionalities like performing operations on variables or ensuring the variable name boundaries.

Difference between `` and $()

Both `` `...` `` (backticks) and `$(...)` have the same purpose: command substitution in shell scripting. However, using `$(...)` for command substitution is generally preferred over backticks for several reasons:


1. --Readability:--

   - `$(...)` is more readable and distinguishable, especially in complex commands or when nested. The backticks can sometimes be hard to spot and can be confused with single quotes.


2. --Nested Substitutions:--

   - `$(...)` allows easier nesting of command substitutions within other substitutions. Nesting backticks can become visually confusing.


3. --Escape Characters:--

   - Within backticks, you might need to escape certain characters, while `$(...)` often requires fewer escape characters and is more consistent.


4. --Portability:--

   - `$(...)` is more portable across different shells. While backticks are widely supported, `$(...)` is considered a more modern and POSIX-compliant syntax.


5. --Clarity:--

   - Using `$(...)` tends to make the code clearer and more maintainable, as it's more obvious where the command substitution begins and ends.


Given these reasons, it's generally recommended to use `$(...)` for command substitution in shell scripts. It offers improved readability, better nesting capabilities, and increased portability across different shell environments.


#CommandSubstitution

#ShellScriptingSyntax

#BackticksVsDollarParentheses

#VariableManipulation

#UnixShellTricks

#ScriptingTips

#CodeReadability

#ShellProgramming

#BashScripting

#ProgrammingTips

Understanding #FilePermissions and Timestamps with #Chmod, #Chown, #Chgrp, and #Touch Commands

In #Unix-based #operatingsystems, managing file permissions, ownership, and timestamps is pivotal for maintaining security and organizing data. The commands "#chmod", "#chown", "#chgrp", and "#touch" are powerful tools that enable users to control access rights and modify file timestamps effectively.

#Chmod - Changing File Permissions

"chmod" stands for "change mode" and is used to modify file permissions. It allows users to set permissions for read, write, and execute for the file owner, group, and others. For example, "chmod 755 filename" grants the owner full permissions (read, write, execute), and read and execute permissions to the group and others.

#Chown - Altering File Ownership

"chown" stands for "change owner" and is employed to change the owner of a file or directory. This command allows system administrators to transfer ownership to a specific user or group. For instance, "chown user:group filename" changes the owner and group of the file to the specified user and group.

#Chgrp - Modifying File Group

"chgrp" denotes "change group" and is used to modify the group ownership of files and directories. It enables users to assign a new group to a file. For instance, "chgrp newgroup filename" assigns the file to the specified group.

#Touch - Managing Timestamps

"touch" is a versatile command used primarily to create new empty files or update timestamps (access and modification) of existing files. When used with non-existing files, "touch" creates them; otherwise, it updates the timestamps. For example, "touch filename" creates a new file or updates its timestamp.

Understanding and effectively utilizing these commands are crucial for system administrators and users to manage file permissions, ownership, and timestamps efficiently. With "chmod", "chown", "chgrp", and "touch", users gain granular control over file attributes, enhancing system security and organization.

Monday, November 27, 2023

A bill intimation #scam is a type of #fraud in which scammers trick people into paying fake bills. This #scam is particularly common in India, where it has caused significant financial losses to unsuspecting #victims.


A bill intimation #scam is a type of #fraud in which scammers trick people into paying fake bills. This #scam is particularly common in India, where it has caused significant financial losses to unsuspecting #victims.

How the #scam works

Scammers typically use SMS, email, or phone calls to contact potential #victims. They pose as representatives of legitimate businesses, such as #electricityproviders, #creditcardcompanies, or #telecommunicationscompanies. They often use official-looking logos and language to make their communications appear authentic.

The scammers will then inform the victim that they have an unpaid bill. They may even include details such as the victim's account number or the amount of the supposed outstanding balance. To create a sense of urgency, they may threaten to disconnect the victim's services or take other punitive actions if the bill is not paid immediately.

The scammers will then provide the victim with a link or phone number to make a payment. This link or phone number will typically lead to a fake website or a scammer's phone line. Once the victim enters their payment information, the scammers will steal it and use it to drain their bank account or make unauthorized purchases.

How to protect yourself from bill intimation scams

There are a number of things you can do to protect yourself from bill intimation scams:

  • Be suspicious of unsolicited messages. If you receive an email, SMS, or phone call from a company claiming that you have an unpaid bill, be suspicious. Do not click on any links or provide any personal information until you have verified the legitimacy of the message.
  • Contact the company directly. If you are unsure whether a message is legitimate, contact the company directly using the phone number or website listed on your bill or statement. Do not use the phone number or website provided in the suspicious message.
  • Never make payments through third-party websites or phone numbers. Legitimate companies will never ask you to make payments through third-party websites or phone numbers. Only make payments through the company's official website or app.
  • Beware of urgent or threatening language. Scammers often use urgent or threatening language to create a sense of panic and pressure you into making a hasty payment. Do not let yourself be rushed into making a decision.
  • Install anti-malware software. Anti-malware software can help to protect you from #phishingwebsites and other online #scams.

If you think you have been the victim of a bill intimation #scam, you should contact your bank or credit card company immediately to report the fraudulent activity. You should also file a police report.

#billintimationscam,

#scam,

#fraud,

#victims,

#electricityproviders,

#creditcardcompanies,

#telecommunicationscompanies,

#phishingwebsites,

#onlinescams


Featured Posts

#Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc

 #Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc Linux is an open-source operating system that is loved by millio...