15 December 2025

Can i use rsync to back up file on windows server?

Yes, you can use rsync to back up files on a Windows Server, but it's not native; you need to use Windows Subsystem for Linux (WSL) for a modern approach or tools like cwRsync for older methods, with WSL being recommended for easier integration and compatibility with Linux environments, enabling efficient, scriptable backups using SSH for secure transfer. 
This video provides an overview of how rsync can be used for backups:
Recommended Method: Windows Subsystem for Linux (WSL)
  1. Enable WSL: Install a Linux distribution (like Ubuntu) from the Microsoft Store on your Windows Server.
  2. Install rsync: Open your WSL terminal and run sudo apt install rsync openssh-client.
  3. Access Windows Files: Mount your Windows directories within WSL (e.g., /mnt/c/) to access them.
  4. Run rsync: Use standard rsync commands like rsync -avz /mnt/c/path/to/source/ user@remote:/path/to/backup/ for secure, efficient transfers, often over SSH. 
This video demonstrates how to install and use rsync on Windows via WSL:
Other Options
  • cwRsync: A Windows-specific distribution of rsync, though setup for unattended backups can be challenging.
  • Linux VM: Run a full Linux VM on the server and use rsync within that environment. 
Key Considerations
  • SSH: For network backups, ensure OpenSSH server is running on the destination, and set up SSH keys for passwordless authentication for scripts.
  • Snapshottingrsync can overwrite, so consider snapshotting techniques or tools with versioning (like Restic/Borg) for better recovery, notes Reddit user on Reddit.
  • Alternatives: For simpler needs, PowerShell/Batch scripts with robocopy or dedicated tools like FreeFileSync or BackupAssist (with rsync module) are alternatives, mention Server Fault user and BackupAssist. 

how to find newly created/changed files/directories on ubuntu?

The following command finds the newest 10 files -

$ find . -type f -printf '%T@ %P\n' | sort -nr | head -n 10 | cut -d' ' -f2-



On Ubuntu (and Linux in general), there are several reliable ways to find newly created or recently changed files/directories, depending on how precise and how far back you want to look.

Below are the most useful and practical methods, from simple to advanced.


1️⃣ Using find (most common & flexible)

🔹 Files changed in the last N days

find /path/to/search -mtime -N

Example: files changed in the last 2 days

find ~ -mtime -2

🔹 Files changed in the last N minutes

find ~ -mmin -30

🔹 Newly created files (best approximation)

Linux doesn’t always store true “creation time”, but you can check change time:

find ~ -ctime -1
OptionMeaning
-mtimeFile content modified
-ctimeMetadata changed (permissions, ownership, creation on some FS)
-mminModified minutes ago

2️⃣ Only directories (not files)

find ~ -type d -mtime -1

Example: directories changed today.


3️⃣ Sort files by newest first

🔹 Files

ls -lt

🔹 Directories only

ls -lt --group-directories-first

🔹 Recursive, newest last

ls -ltrR

4️⃣ Using stat (detailed timestamps)

stat filename

Shows:

  • Access time

  • Modify time

  • Change time

  • Birth time (if filesystem supports it)

Example:

stat myfile.txt

5️⃣ Find files changed since a specific date/time

🔹 Create a reference file

touch /tmp/ref_time

🔹 Later, find newer files

find ~ -newer /tmp/ref_time

Very useful for tracking changes during installs or scripts.


6️⃣ Real-time monitoring (advanced)

🔹 Monitor directory changes live

inotifywait -m -r ~/somefolder

(Requires package)

sudo apt install inotify-tools

7️⃣ GUI (Files app / Nautilus)

  1. Open Files

  2. Go to the folder

  3. Click ⋮ → Sort by → Modified

  4. Choose Descending


🔑 Which method should you use?

ScenarioBest choice
“What changed today?”find -mtime -1
“What changed in last 10 minutes?”find -mmin -10
“What did a script change?”find -newer
“Watch changes live”inotifywait
“Quick visual check”GUI sort

14 December 2025

My laptop is Windows 11 and Ubuntu 24.04 dual boot. How can I assign more SSD space to Ubuntu (i.e. from Windows)?

You can do this safely, but do it in the right order. Below is the recommended, low-risk method for a Windows 11 + Ubuntu 24.04 dual-boot system.


⚠️ Before you start (important)

  1. Back up important files (both Windows and Ubuntu).

  2. Turn off Windows Fast Startup

    • Windows Settings → System → Power & sleep → Additional power settings

    • Choose what the power buttons do → Change settings currently unavailable

    • Uncheck “Turn on fast startup”

This prevents filesystem corruption.


✅ Overview of the process

You will:

  1. Shrink the Windows partition (from Windows)

  2. Boot into Ubuntu live USB

  3. Expand the Ubuntu partition using GParted


🧩 Step 1: Shrink Windows partition (from Windows)

Never shrink Windows from Linux.

  1. Boot into Windows 11

  2. Press Win + XDisk Management

  3. Right-click the Windows (C:) partition

  4. Choose Shrink Volume

  5. Enter how much space to shrink (in MB)

    • Example:

      • 50 GB → 51200

      • 100 GB → 102400

  6. Click Shrink

👉 You will now see Unallocated space on the disk.


🧩 Step 2: Boot Ubuntu Live USB

You cannot resize Ubuntu while it’s running.

  1. Insert Ubuntu 24.04 USB

  2. Reboot → press F12 / F10 / Esc / Del (depends on your laptop)

  3. Choose the USB

  4. Select “Try Ubuntu”


🧩 Step 3: Resize Ubuntu partition (GParted)

Ubuntu live includes GParted.

  1. Open GParted

  2. Select your SSD (top-right dropdown, e.g. /dev/nvme0n1)

  3. Identify partitions:

    • EFI (small, ~100–500MB)

    • Windows NTFS

    • Ubuntu ext4

    • Swap (if present)

Case A: Unallocated space is next to Ubuntu

  1. Right-click Ubuntu partition → Resize/Move

  2. Drag to take the unallocated space

  3. Click Apply


Case B: Unallocated space is not adjacent

You must move partitions (slow but safe).

Typical order:

  1. Move swap partition (if exists)

  2. Then resize Ubuntu

⚠️ Do not move the EFI partition


🧩 Step 4: Reboot

  1. Close GParted

  2. Reboot

  3. Remove USB

Ubuntu should now have more space 🎉


🧪 Verify in Ubuntu

df -h

or

lsblk

❗ Common mistakes to avoid

❌ Shrinking Windows from Linux
❌ Forgetting to disable Fast Startup
❌ Interrupting GParted while it’s working
❌ Touching EFI partition


🧠 Extra tips

  • If Ubuntu uses LVM, the steps are slightly different

  • If you use BitLocker, suspend it before shrinking Windows

  • NVMe SSDs are fine; just make sure you select the correct disk


If you want, you can:

  • Tell me whether your Ubuntu uses LVM or normal ext4

  • Paste the output of:

lsblk

(from Ubuntu live)

and I’ll give you exact, partition-by-partition instructions tailored to your laptop.

On Ubuntu, how to run one of the commands I ran before again?

To rerun a command from your history, use ! followed by its number (e.g., !123), or use !! for the very last command, !-2 for the second-to-last, or press Ctrl+r and type part of the command to search for it, then hit Enter. 
By History Number
  1. View History: Type history and press Enter to see a numbered list.
  2. Re-run: Type ! then the number of the command (e.g., !567 to run command #567). 
bash
# Example:
history
# ... (list of commands with numbers) ...
!123 # Runs the 123rd command
Shortcuts
  • !!: Runs the immediately preceding command.
  • !-2: Runs the second-to-last command.
  • !string: Runs the most recent command starting with string (e.g., !ls runs the last ls command). 
Reverse Search (Ctrl+r) 
  • Press Ctrl+r to enter interactive search mode.
  • Type part of the command you're looking for (e.g., ssh).
  • Press Ctrl+r again to cycle through older matches.
  • Press Enter to run the command, or Esc to exit search without running. 
  • If you have cycled through some older matches, now you want to cycle
    through some new 
    matches, you can add the following line to your  ~/.bashrc file:
stty -ixon
Starting now, you can press   Ctrl+s to cycle through new matches.