In Part 1 of this tutorial series, we introduced the basics of Bash scripting on Linux. We learned how to write simple scripts, use variables, loops, conditionals, and even schedule tasks with cron. Now, let’s build on that knowledge with some beginner-friendly, yet more advanced, techniques.

In this article, we’ll explore:

  • Functions: Reusable blocks of code to keep your scripts clean and organized.
  • Command-line arguments: How to make your scripts accept input directly from the terminal.
  • Basic error handling: Checking for problems so your scripts can deal with them gracefully.
  • Simple logging: How to capture the output of your script for future reference.

Don’t worry, we’ll keep things simple and explain everything along the way. By the end of this guide, you'll feel more confident about writing Bash scripts that are a little more dynamic and smarter!


1. Using Functions to Keep Things Organized

As your scripts get bigger, you’ll notice you’re doing similar things in different parts of the script. That’s where functions come in handy. A function is a way to group commands together and reuse them throughout your script.

Think of it like a recipe you can call anytime you need it!

How to Create a Function

The syntax for creating a function is simple:

Bash:
function_name() {
# Your commands here
}

Let’s say you want to greet the user. Instead of writing the same command over and over again, you can create a function for it:

Bash:
#!/bin/bash
# Define a function to greet the user
greet_user() {
echo "Hello, $1! Welcome to Bash scripting!"
}

# Call the function
greet_user "Alice"
greet_user "Bob"

In this script:

  • We define the function greet_user that prints a greeting.
  • $1 represents the first argument passed to the function (in this case, the user’s name).

When you run the script, you’ll see:

Hello, Alice! Welcome to Bash scripting!
Hello, Bob! Welcome to Bash scripting!

You can pass different names to the function, making it reusable. Functions are super helpful when you need to use the same logic multiple times in your script.


2. Command-Line Arguments: Making Your Script Interactive

Wouldn’t it be great if you could pass information to your script when you run it, instead of hardcoding values into it? Bash lets you do that with command-line arguments.

What Are Command-Line Arguments?

Command-line arguments allow you to pass data to your script from the terminal. For example, instead of telling the script what to do beforehand, you give it instructions when you run it.

Here’s an example script that accepts a name and a favorite color as arguments:

Bash:
#!/bin/bash
# The first argument is the name, the second is the favorite color
greet_user() {
name=$1
color=$2

echo "Hello, $name! Your favorite color is $color."

Let’s say you save this script as greet.sh. You can run it from the terminal like this:

./greet.sh Alice blue

And the output will be:

Hello, Alice! Your favorite color is blue.

Accessing Command-Line Arguments

  • $1, $2, $3, etc., represent the first, second, third argument, and so on.
  • $0 represents the script's name.
  • $# gives the total number of arguments passed.

This makes your scripts much more flexible. Now, instead of changing the script every time you want to run it with different inputs, you just pass new arguments directly from the terminal!


3. Basic Error Handling: Dealing with Problems

Not everything goes smoothly in scripting, especially when dealing with files or commands that might fail. That's why it’s important to include error handling in your script. You don’t want your script to keep running if something goes wrong!

Checking the Exit Status of a Command

Every command in Bash returns an exit status:

  • 0 means the command was successful.
  • Any number other than 0 means something went wrong.

We can use this exit status to handle errors. For example, let’s check if a file exists before trying to copy it:

bash:
#!/bin/bash

# Check if the file exists before copying
if [ -f "$1" ]; then
cp "$1" /backup/
echo "File copied successfully."
else
echo "Error: $1 does not exist."
exit 1 # Exit with an error code
fi

Here’s how this script works:

  1. The if [ -f "$1" ] checks if the file exists (-f checks for a file).
  2. If the file exists, it copies the file.
  3. If the file doesn’t exist, it prints an error message and exits the script with an error code (1).

If you run the script like this:

./copy.sh myfile.txt

And myfile.txt doesn’t exist, you’ll see:

Error: myfile.txt does not exist.

Adding error handling like this helps your script avoid continuing with bad data or broken commands.


4. Simple Logging: Keeping Track of What Happens

Logging is a way to record what your script does. Instead of relying on memory or watching the terminal, you can save everything that happens into a file for future reference.

Redirecting Output to a Log File

You can easily redirect the output of your script to a file. Here’s how:

Bash:
#!/bin/bash
# Redirect output to a log file
exec > script.log 2>&1

echo "This is a log of everything that happens in this script."
date # Logs the current date and time
echo "Done!"

Let’s break it down:

  • exec > script.log 2>&1 redirects all output (both standard output and error messages) to a file called script.log.
  • Now, anything the script prints will go to the log file instead of the terminal.

After running the script, open script.log, and you’ll see:

This is a log of everything that happens in this script.
Tue Oct 17 10:00:00 UTC 2024
Done!

Logging is incredibly useful for tracking what happens in long-running or automated scripts.


5. Combining It All: A Simple Example

Now, let’s combine everything we’ve learned so far into one simple script. This script will:

  1. Accept a filename as an argument.
  2. Check if the file exists.
  3. If it exists, copy it to a backup directory and log the action.
  4. If it doesn’t exist, log an error.

Here’s the script:

bash:
#!/bin/bash

# Redirect all output to a log file
exec > backup.log 2>&1

# Check if exactly one argument (a file name) is passed
if [ $# -ne 1 ]; then
echo "Usage: $0 filename"
exit 1
fi

# Check if the file exists
if [ -f "$1" ]; then
# Copy the file to the backup directory
cp "$1" /backup/
echo "$(date): $1 copied to /backup/"
else
echo "$(date): Error - $1 does not exist."
exit 1
fi

If you run this script and provide a valid file, it will copy the file to /backup/ and log the success message. If the file doesn’t exist, it will log an error.


Conclusion

In this article, we’ve built on the basics of Bash scripting by introducing functions, command-line arguments, error handling, and logging. These are essential skills that will help you write more effective and robust scripts.

As you practice these new techniques, you’ll see how much more dynamic and powerful your scripts can become. Whether you’re automating backups, processing files, or just learning to make the most out of the Linux command line, you now have some new tools to get the job done!

In the next article, we’ll dive deeper into more intermediate scripting techniques, but for now, keep practicing with what you’ve learned here. Happy coding!

Linux is a powerful operating system, not only because of its stability and open-source nature but also because of the incredible control it gives users over their system. One of the most effective ways to harness this power is through Bash scripting, which allows you to automate tasks, simplify processes, and unlock greater efficiency in managing Linux environments.

In this tutorial, we'll walk you through the basics of creating and running a Bash script. Whether you're new to Linux or looking to expand your skills, this guide will get you started with scripting.


What is Bash?

Bash (short for Bourne Again Shell) is a command-line interpreter that provides a user interface for Unix-based systems, including Linux. The shell is where you can type commands, run programs, and interact with the underlying OS. Bash scripts are text files that contain a series of commands executed line by line.

By learning how to write Bash scripts, you can automate repetitive tasks, schedule jobs, and even build complex workflows.


Part 1: Writing Your First Bash Script

Step 1: Create a New Script File

To create a new Bash script, you first need to create a file that will store your commands. Open a terminal and use a text editor (like nano or vim) to create a new file. For this example, let's use nano:

Bash:
nano myscript.sh

The .sh extension is commonly used for Bash scripts, though it's not required. You can name the file anything you want.

Step 2: Add a Shebang

At the very top of your script file, include a shebang line. This tells the system that the script should be executed using Bash. The shebang is written as follows:

Bash:
#!/bin/bash

Without this line, your script might not know which shell to use, especially if you're running it in a different environment.

Step 3: Add Commands to the Script

Now, let's add some simple commands. For example, we can create a script that outputs "Hello, World!" and shows the current date:

Bash:
#!/bin/bash
# This is a comment
echo "Hello, World!"
echo "Today is: $(date)"
  • The echo command prints text to the terminal.
  • The $(date) command executes the `date` command and substitutes its output.

Step 4: Save and Exit

Once you've written your script, save the file by pressing CTRL + O in nano, then press Enter. To exit, press CTRL + X.


Part 2: Running Your Script

Step 1: Make the Script Executable

Before running your script, you need to give it executable permissions. You can do this using the chmod command:

Bash:
chmod +x myscript.sh

This command tells Linux that the file can be executed like a program.

Step 2: Run the Script

Now that your script is executable, you can run it by typing:

Bash:
./myscript.sh

You should see output similar to:

Bash:
"Hello, World!"
"Today is: Mon Oct 16 12:34:56 UTC 2024"

Congratulations! You've just written and executed your first Bash script.


Part 3: Adding Variables and Logic

Bash scripts become more useful when you introduce variables and basic logic. Let’s expand our script.

Step 1: Using Variables

You can store values in variables and use them throughout your script. Here’s an example of a script that asks for your name and greets you:

Bash:
#!/bin/bash
# Prompt the user for their name
echo "Enter your name:"
read name

# Greet the user
echo "Hello, $name! Welcome to Bash scripting."

In this script:

  • The read command captures user input and stores it in the name variable.
  • Variables in Bash are referenced by prefixing the variable name with a dollar sign ($).

Step 2: Using Conditional Statements

Bash supports if statements for basic decision-making. Here’s an example that checks if the user is root (the system administrator):

Bash:
#!/bin/bash
# Check if the user is root
if [ "$USER" == "root" ]; then
echo "Hello, root user!"
else
echo "You are not the root user."
fi

The if statement checks if the USER environment variable is equal to root. The then block runs if the condition is true, and the else block runs if it’s false.

Step 3: Loops in Bash

Bash also supports loops, which are essential when you want to repeat a task multiple times. For example, here’s a script that prints numbers from 1 to 5:

Bash:
#!/bin/bash
# Loop from 1 to 5
for i in {1..5}; do
echo "Number: $i"
done

Part 4: Making Your Script More Useful

Let’s apply what we've learned to automate a real task—backing up a directory. This script will copy all files from a source directory to a backup location.

Step 1: Backup Script Example

Bash:
#!/bin/bash
# Define variables
source_dir="/home/user/documents"
backup_dir="/home/user/backup"

# Create the backup directory if it doesn't exist
mkdir -p "$backup_dir"

# Copy files
cp -r "$source_dir"/* "$backup_dir"

# Print a success message
echo "Backup completed successfully."

Step 2: Scheduling with Cron

To automate running this script daily, you can use cron, a task scheduler in Linux. To set this up, follow these steps:

  • Open the cron configuration file with the following command:
Bash:
crontab -e
  • Add a new line to run your script every day at 2 AM:
Bash:
0 2 * * * /path/to/myscript.sh

Save and exit. Now, your script will run automatically every day.


Conclusion

Bash scripting is a powerful tool that allows you to automate tasks, create workflows, and manage your Linux environment more efficiently. In this tutorial, we’ve covered the basics of writing and running Bash scripts, introduced variables, logic, and loops, and demonstrated how to automate tasks with cron.

With these fundamentals, you can now explore more advanced features like functions, error handling, and interacting with other Linux tools. Happy scripting!

Building a good marketing strategy has always been important for any business. When it is perfectly tuned, the right marketing strategy helps a business grow faster. However, there are some issues that people may encounter when coming up with a marketing strategy.

It may demoralize you and slow you down. You may also not get the results that you want or had hoped for. So, what are some things that one should avoid when developing a marketing plan? Read this article to know more about it.


5 Things You Need to Avoid

There are many things that can be marked as important to avoid when it comes to building a marketing strategy. Here are some common mistakes to avoid when building one:

  1. Not Partnering With a Reputable Marketing Agency

    One of the biggest mistakes businesses make is not hiring a reputable marketing agency if they don’t have the capacity in-house. If you have been having a hard time creating or executing your marketing plan, you should always aim to outsource it to people who have the experience and track record of success in your niche.

    For instance, a law firm shouldn’t step into unchartered territory. Instead, they could hire a law firm marketing agency that focuses on their niche. A good agency can help you as a client with the necessary advice, tools, and assistance in marketing.

  2. No Robust Goal-Setting Process

    Lack of goals means that your marketing plan will not have clear objectives and thus will not be able to demonstrate a high level of performance. Many companies struggle to create a marketing plan without having clear objectives.

    This way, they only get frustrated with time and waste resources and energy that they would not recover again. Therefore, what should this do you about it? The first thing to do is to set SMART goals. It refers to:

    • S - Specific
    • M - Measurable
    • A - Achievable
    • R - Relevant
    • T- Time-bound
    When it comes to establishing marketing goals, it does not matter whether you want to raise brand recognition, generate leads, or create sales; it is always crucial to have proper goals. They will create a clear vision about what has to be done and help you plan your actions and steps. Most importantly, they will allow you to understand whether you are getting closer to the goal or not.
  3. Failure to Practice SEO and or Content Marketing

    You may be familiar with the saying, ‘Content is King.’ Hence, you should use SEO and content marketing to develop quality and informative content that will suit your targeted audiences and those offered by search engines. (If you hire an agency, they’ll do it for you).

    It’s recommended to write and share blog posts, articles, and videos more often, where you describe your customers’ issues and suggest solutions. Also, your site needs to be SEO-friendly which is why you ought to consider keywords, Meta descriptions, and site speed.

  4. Ignoring Social Media Engagement

    Many businesses either do not know the importance of social media networking and if they do, they cannot fully utilize it. Creating blogs, and pages, and sharing a post will not necessarily assist you in accomplishing your mission of targeting the appropriate audience if there isn’t a proper social media strategy in place.

    Remember social media works both ways; an organization should engage its customers and develop relations with them. Thus, engage on social media by scheduling posts, commenting, liking, and responding to both comments and messages.

  5. Not Tracking Results

    Finally, the last but the most critical error most business people make is not tracking performance. If you don’t know what strategies yield positive outcomes, they can’t be measured. This can cause many campaign bottlenecks, and many resources end up being channeled to the wrong ones.

    How do you tackle this problem when creating a marketing campaign? First, it is critical to check the effectiveness of the marketing campaigns regularly using analytical tools. This calls for setting up and monitoring appropriate factors like unique visitors and traffic to the website, conversion rates, and ROI.

    With these points, you can fine-tune your strategy to perform far better and achieve the most desirable outcome. This may require routine adjustments from time to time until you pinpoint the best strategy.


Final Words

Laying down a good marketing strategy and steering clear of the above-mentioned pitfalls will set your business up for success in today’s business environment. It is equally important to know the new trends that apply in marketing.

The best way to do that is through attending events and conferences to learn about new practices. Using these new practices will allow you to get a competitive edge over others.

Blockchain technology is often seen primarily as the foundation of cryptocurrencies like Bitcoin. However, it offers much more, with potential applications across various sectors. At its core, blockchain is a decentralised digital ledger that records transactions across multiple computers. This setup ensures that any recorded data cannot be altered retroactively, providing a layer of security that is crucial in today's digital age.

Your understanding of blockchain is vital because it shapes the future of secure digital transactions and information sharing. The technology allows for transparent, tamper-proof systems that can operate independently of centralised authority. This characteristic is precious in areas where trust needs to be established without relying on a central entity, opening up possibilities for innovation in previously unimaginable ways.


The Impact of Blockchain on Global Finance Systems

Blockchain technology is redefining the structure of global finance systems, allowing for more secure and efficient transactions. Its ability to provide a secure and immutable ledger means that every transaction can be traced and verified, reducing the risk of fraud and errors. This is particularly crucial in an era where digital transactions are becoming the norm, not the exception. Your financial security and the integrity of your transactions are greatly enhanced by this technology, which ensures that each entry is corroborated by a network of computers.

The blockchain reduces the need for traditional banking intermediaries, which often slow down and complicate financial processes. By streamlining transactions, blockchain can offer faster processing times and lower fees, making financial services more accessible to people whom the conventional banking system may underserve. This democratisation of finance not only supports economic growth but also encourages a broader inclusion within the global economy.


Blockchain for Identity Verification

Ensuring the authenticity of personal identity is paramount. Blockchain offers a solution by creating a secure, decentralised platform for identity verification that can combat identity theft and fraud. The technology allows for the creation of a tamper-proof, accessible record of an individual's identity details, which can be shared securely between authorised parties. This approach reduces your risk of identity theft, as the decentralised nature of blockchain makes it exceedingly difficult for fraudulent activities to go unnoticed.

When your personal information is secured on the blockchain, it becomes easier for you to control and manage access to your sensitive data. This level of control is empowering, providing you with peace of mind when engaging in online activities, from financial transactions to voting. Blockchain’s potential in identity verification is a technical improvement and a step towards reclaiming personal data sovereignty, which is crucial when data breaches are common.


The Latest Trends in Blockchain and Crypto

Keeping abreast of the latest trends in blockchain and cryptocurrency is crucial as these technologies evolve rapidly. Whether it’s the development of new blockchain platforms or updates to existing currencies, staying informed can give you the edge in understanding and potentially benefiting from these innovations. The dynamic nature of this field requires constant learning and adaptation, ensuring that your knowledge remains current and relevant.

For those keen on the latest updates in this exciting field, visiting reliable sources of crypto news can be invaluable. These platforms provide insights into market trends, technological advancements, and regulatory changes, helping you make informed decisions. This practice enhances your understanding and ensures that you are well-equipped to discuss and potentially invest in new opportunities within the blockchain and cryptocurrency landscape.

Blockchain technology transcends its initial financial applications to impact various sectors, including healthcare, real estate, and identity verification. Your appreciation of these advancements allows for a broader understanding of how secure, transparent, and efficient systems can revolutionise daily operations and personal security. These technologies will continue to develop and offer more streamlined services and a higher degree of control over personal data and finance.

When it’s time to deliver presentations to a large or small audience on the go, both projectors and portable monitors offer distinct advantages and disadvantages. It’s important to understand the key differences between these devices to choose the one that best suits your needs and enhances your presentations. Their usage should also be manageable in your specific situation.

If you’re looking for a seamless way to deliver presentations on the move, you can visit Mobile Pixels USA. Here, you can invest in a Mobile Pixels Trio laptop screen extender to assist you with quick and efficient presentations.

Are you unsure about which device to use for your next presentation? Let this blog provide in-depth insights into the situational advantages, audience engagement considerations, and image quality differences between portable monitors and projectors.

Situational Advantages

Portable Monitors

Portability

The portability of portable monitors is unmatched. They can easily fit into a laptop bag or backpack without damaging other items, making them ideal for presentations in any setting or location. Whether you're in a small conference room or an outdoor space, portable monitors are highly adaptable.

Flexibility

One of the standout features of portable monitors is their flexibility. They are compatible with a wide range of devices, including laptops, tablets, and smartphones. This allows you to connect the additional screen to your preferred device, impressing your audience with an enhanced presentation setup.

Projectors

Large Screen Size

You’re likely familiar with the primary function of projectors—they can display images on a large screen, offering a more immersive view of shared visuals and engaging the audience effectively.

Cost-Effective

Compared to multi-monitor setups or large-screen TVs, projectors are generally more cost-effective, especially for large-scale presentations.


Image Quality

Portable Monitors

Higher Resolution

In terms of image quality, portable monitors excel with higher resolutions, delivering sharp and detailed visuals. Presenting through a portable monitor ensures crisp visuals, keeping your audience engaged.

Viewing Angle

Portable monitors typically have a narrower viewing angle compared to projectors. This means that image quality may degrade when viewed from off-center positions, limiting the experience for audience members who aren’t directly in front of the screen.

Projectors

Brightness

Projectors can produce bright images even in well-lit environments, ensuring that your presentation remains visible regardless of ambient lighting.

Image Quality

The image quality from a projector can be influenced by several factors, including resolution, screen size, and lighting conditions in the room.

Audience Engagement

Portable Monitors

Intimate Setting

For smaller audiences, portable monitors are ideal. They help create a more intimate setting, where the audience can focus on the visuals with greater attention.

Limited Audience Size

Portable monitors work best for smaller crowds. Their screen size is perfect for delivering presentations to limited audiences.

Projectors

Larger Audience

If you’re presenting to a large audience, a projector is your go-to device. It projects large images that can be seen by everyone in the room, ensuring no one misses important details.

Potential Distractions

While projectors are great for large audiences, the size of the screen can sometimes be a distraction. If the projector is not used correctly, it may divert attention away from critical content.


Conclusion

Now that you’re aware of the differences between portable monitors and projectors, you can make an informed decision about which device is best for your presentation. Choose based on your specific needs and the size of the audience you plan to address.

Admins can search for emails deleted when assigning a retention policy to user mailboxes or any other automated process. Since a user cannot recover the deleted emails, only the admin can do it.

If the admin has a backup of the deleted emails, it becomes easier to recover a specific email message. However, if there is no backup, the deleted item should be under its retention period of 14 days.

Here is the method to search deleted emails and restore it to a target mailbox using the Exchange Management Shell cmdlet. Prior to that, you should have information about several basic aspects of the Exchange Server 2019 and the deleted email.


What do you need to know before recovering deleted emails?

Before you start searching for the deleted email messages in Exchange Server 2019 and go on to recover them, you need to get information about several important aspects:

  • Source mailbox: That you want to search for messages
  • Target mailbox: Where you can store the recovered messages. Also called discovery mailbox, Exchange Server 2019 creates it by default.
  • Search Criteria: Should include information about the sender, recipient, keywords, etc. in the message

Do you have the required permission?

Before you look out for the deleted email messages in the Exchange Server 2019 mailbox, you need to have relevant Mailbox Import / Export permission in the Exchange Admin Center. Here are the steps:

  • Login to your EAC account with your Exchange Server 2019 credentials
  • Navigate to Permissions -> Admin Roles
  • From here, you can assign the mailbox Import / Export role to an existing Role Group
  • Alternatively, you can also create a new role group
  • After creating the role group, wait for an hour before the permissions come into effect

For detailed information on seeking the right permission, click the eDiscovery permissions page on the Microsoft website.


Step 1: Search for missing items and recover them

With relevant permissions, you can now go on to search and recover deleted emails. The first step in the Exchange email recovery process will be to look out for the email messages in the source mailbox.

The EMS cmdlet Get-RecoverableItems will be helpful to perform the search. Here is an example:

Get-RecoverableItems -Identity search@Olympics.com -SubjectContains "Paris Olympics" -FilterItemType IPM.Note -FilterStartTime "8/8/2024 12:00:00 AM" -FilterEndTime "10/10/2024 11:59:59 PM"

This example will fetch all the deleted messages with the mentioned subject in the mailbox search@Olympics.com for the provided date and time range.

To verify a successful search for the deleted email, sign in to the discovery mailbox that you chose as the target mailbox and go through the search results.


Step 2: Restore recovered items

Just like in the case of email search, you will need to have the requisite permission to restore the recovered emails from Exchange Server 2019 as well. To find out the relevant permission, go through the Assign eDiscovery permissions in Exchange Server page on the Microsoft Website.

You can use the Search-Mailbox cmdlet to restore the recovered message from the discovery mailbox to the user’s mailbox.

Here is the EMS cmdlet to restore the recovered emails.

$mailboxes = Import-CSV "C:\My Documents\RestoreMessage.csv"; $mailboxes | foreach { Restore-RecoverableItems -Identity $_.SMTPAddress -SubjectContains "Project" -SourceFolder DeletedItems -FilterItemType IPM.Note }

As you can see, this example attempts to restore the deleted email message “Project” for the mailbox included in the specified CSV file (RestoreMessage.csv)


Limitations of the manual method

The EMS cmdlets can help to perform Exchange emails recovery and restore the deleted emails but this manual method accompanies several restrictions:

  • You will need to possess admin permissions to perform the recovery task
  • You must do the email recovery before its default retention period of 14 days expires
  • Exchange Server 2019 disables single-item recovery by default when you create a mailbox. For email recovery, you need to enable this option by configuring mailbox settings in the EAC or by PowerShell commands.

To get away with these limitations, admins can confide in a reliable third-party Exchange recovery tool such as Stellar Repair for Exchange.


Stellar Repair for Exchange for Email Recovery

A prominent software for Exchange email recovery, it leverages advanced scanning algorithms to look out for deleted emails in the mailboxes and restores them without hassles. It is popular among small and big organizations for its capability to restore offline and dismounted EDB files with precision. Here are more reasons to confide in this tool.

  • Recommended by MVPs to repair EDB files
  • Restores mailbox contents including email messages, contacts, notes, etc.
  • Repairs the EDB files with zero risk of data loss
  • Can restore multiple mailboxes at once
  • Does need to seek permission for email recovery
  • Sets you free from the hassles of command lines, as in the case of EMS cmdlets
  • Can locate and recover deleted emails easily
  • Can perform single email recovery without making changes to mailbox settings
  • Log report generation of Exchange Recover to help you analyze the repair process
  • Any person without a technical background can also use it for email recovery

Steps for email recovery via Stellar Repair for Exchange

Here are the easy steps to recover the deleted emails and restore them in the Microsoft Exchange Server 2019 by using Stellar Repair for Exchange.

Stellar Repair for Exchange can recover deleted emails from the Recover Deleted items Folders.

  • In the main menu, Home ribbon, click Recoverable Items Folders
  • A Recoverable Items Folders dialog box appears on the screen. Click Yes to rescan the added files and identify the recoverable emails.
  • In the resulting Recoverable Item Folders dialog box, click Yes to rescan the selected EDB files.
  • This will open Select Recoverable Items Folders dialog box. It will ask you to choose the folders that you want to recover along with their mailboxes. Here are the options:
    1. Recovery Items: Includes all the deleted emails
    2. Purges: Includes emails purged by using Purge selected Items.
    3. Calendar Logging: Consists of the purged calendars
    4. Versions: Includes the modified and the original copies of the purged emails
    5. Deletions: Contains deleted emails whose retention period is yet to expire
    6. Audit Logging: Consists of audit log entries of the updated file.
    7. Substrate Hold: comprises the original copy of the updated EDB file
    8. eDiscovery E Hold: Contains emails that you want to protect from deletion
  • Next, click Apply to get a tree view on the screen
  • Click the unknown folder, and expand it to find the recovered emails

Download the free trial version to scan and preview your deleted emails. You may also choose to buy the paid version of this Exchange Server recovery tool. Depending on your specific requirements, you can subscribe for Corporate, Technician, or Toolkit editions.


Conclusion

You may have deleted your important emails from Exchange Server 2019 only to realize their importance later on. In any case, recovering and restoring those emails becomes indispensable.

You may use Exchange Management Shell (EMS) cmdlets for this purpose. However, it is important to do the recovery task within the 14-day retention period beyond which the deleted email will become inaccessible. It is hence always good to have a backup of your EDB file, as it will make it easier to restore the deleted email.

Since the manual method accompanies certain limitations, such as the need to have permissions, configure the disabled single email recovery option to enable it, etc. To avoid these hassles, Stellar Repair for Exchange will be the ideal software.

Recommended by MVPs and used by renowned corporate hubs, this Exchange Recovery tool recovers and restores deleted emails from the mailboxes in a breeze. You can use its trial version to start with. To benefit from its entire features, you may proceed to buy any of its paid editions.

How to Recover Permanently Deleted Files On Windows 10/11?

You may accidentally delete files, lose data, or be unable to locate a file. This situation could vary from a minor inconvenience to a disaster depending on the importance of the lost data. While permanently deleting files may seem unfixable, there are ways to reverse it.

What is a Permanently Deleted File?

A file is considered to be permanently deleted when it is discarded from the system's storage and is inaccessible.

You can permanently delete a file by using the Shift+Del shortcut or by emptying an already deleted file from the Recycle Bin.

Recovering Deleted Files from The Recycle Bin

Deleted files usually end up in the Recycle Bin. The default folder temporarily stores deleted files until the user permanently deletes the file or empties it from the Recycle Bin.

You can recover deleted files from the Recycle Bin (if it hasn't been emptied yet) by simply opening the folder, right-clicking on the deleted file, and selecting the restore option.


Note: You can also recover deleted files using Ctrl+Z to Undo the deletion. This of course only works immediately after deleting said file.

1. Recovering Permanently Deleted Files Without A Backup

If deleted or emptied from the Recycle Bin, a file is usually considered to be permanently deleted.

How is it possible to recover permanently deleted files from Windows?

The way deletion works is that the location where deleted data is stored is not erased, but is instead marked as empty and ready to be overwritten with new data.

By taking advantage of this deletion process, we can restore the deleted files using the right methods.

1.1) Recover Permanently Deleted Files in Windows 11 by Using a File Recovery Software

The next best thing to a professional data recovery service is great software. While there are several free software such as Recuva and Photorec, they are only compatible with mainstream file types and the user interface will take some getting used to.

On the other hand, tools like Remo File Recovery Software for Windows are compatible with over 500+ file types and are great at what they do. Combining both user-friendliness and effectiveness to allow anyone to easily recover permanently deleted files.

Here, we will show how you can easily recover deleted or lost files:

  1. Download, install, and launch Remo File Recovery Software for Windows.
  2. Select the drive that is used to store the deleted files and click on Scan.
  3. The software will carry out a Quick Scan followed by a thorough Deep Scan.
  4. During the scan, you can use the Dynamic Recovery View Option to view all the files recovered so far.
  5. Double-click to preview any file and click on the Recover Button.
  6. Select a destination location and click on OK to save the deleted file.

1.2) Recover Permanently Deleted Files Using Windows File Recovery

Windows File Recovery is a free tool that you can download from the Microsoft Store. While it can get the job done, you would need to work out the right command to feed as input. If you are comfortable putting in a little effort to understand the tool and how it works, Windows File Recovery will be a good fit.

2. Recovering Permanently Deleted Files Using Windows Backup Features

If you had taken precautions earlier to set up a backup, there is a great chance of restoring your deleted files.

2.1) Restore Deleted Files from Previous Versions of Windows

The previous version's feature allows users to regain access to an older version of a file or folder. They can be used in instances where you may have made errors on an Excel file or accidentally deleted a file from a folder.

Note: This will only work if the Previous version feature was set up before the files were deleted.

You can follow the steps below to restore your Deleted Files:

  1. Open Windows File Explorer and access the location where the deleted file used to be stored.
  2. Right-click anywhere.
  3. Select More Options and click on Properties.
  4. Go to the Previous Versions tab, select the version where your file hasn't been deleted, and click Restore.

2.2) Restore Files Using the File History

While version history stores multiple versions of the same file, File history captures your drive and usually creates a copy on an external drive. For this to work, you would need to have set up and updated the backup drive before the file in question was deleted.

  1. Connect the backup drive that stores your file history data.
  2. Open Windows Settings.
  3. Using the search box, search for and click on Restore your files with File History.
  4. Select and Restore your deleted files.

3. Recovering Permanently Deleted Files Using OneDrive

Cloud services store data on behalf of their users allowing them to store and access data anytime and anywhere provided they have an account and an internet connection. Cloud services can also be used to backup important data, so if you have stored a backup using a cloud service such as OneDrive, then you can easily recover it.

If your deleted file happened to be an Excel sheet, a PowerPoint, a Word Document, or any other file format of the Office Suite, there is a good chance that you may recover your data if the Office Suite is synced with OneDrive.

  1. Sign in to your OneDrive account with your Microsoft credentials.
  2. Once logged in, you will easily be able to locate the files you recently worked on. You can also locate your deleted file using the search option.
  3. Once located, right-click the file and select the Download option.

Conclusion

I hope you were able to safely recover your permanently deleted files on Windows. During such cases, a trusted third-party software is not only convenient but also has some of the highest success rates. To prevent such scenarios from repeating, creating and maintaining a backup is the best option.

Dash is a revolutionary cryptocurrency that guarantees speed, security, and decentralization. Quickly gaining traction since its launch in 2014 as XCoin, the currency has been upgraded several times to provide users with an improved experience. The two-tier network of "masternodes" offers extra services while maintaining a safe environment for transactions; plus, it utilizes a unique consensus mechanism known as “Proof of Service” which combines elements from both Proof of Work and Proof of Stake.

With DASH, you can rest assured knowing that your money is protected and secure - now more than ever before. With its low fees and lightning-fast confirmation time, DASH makes it easier than ever to send and receive payments. Its versatility also extends beyond just being a currency - from e-commerce platforms to remittances, there are numerous ways that users can benefit from this revolutionary payment system.


Here are some of the main advantages of the DASH platform:

  • Fast transaction times. DASH uses a two-tier network that allows for quick confirmation times, with the ability to process up to 56 transactions per second.
  • Low transaction fees. DASH transaction fees are typically lower than those of traditional payment methods, making it a more cost-effective option for users.
  • Decentralization. DASH is a decentralized platform that operates on a distributed ledger, which means that transactions are verified and recorded by a network of nodes rather than a centralized authority.
  • Enhanced security. DASH's two-tier network includes "masternodes" that provide additional services and security to the network, including InstantSend and PrivateSend features.
  • Innovative consensus mechanism. DASH's "Proof of Service" consensus mechanism combines elements of Proof-of-Work and Proof-of-Stake, providing a more secure and efficient approach to validating transactions.
  • User governance. DASH's decentralized governance structure allows users to vote on key decisions related to the platform's development and direction.

DASH Investments

In 2018, the DASH coin skyrocketed to its highest point ever, reaching an outstanding $1165. Throughout 2019 and 2020, it hovered around a range of $65 -$80 before dropping drastically in late 2022 due to negative news on the FTX exchange.