30. Upload-Safe File Partitioning
Beginner Mode
Start your terminal to use beginner mode.
Scenario
Your application uploads files from /tmp/app/, but the maximum allowed file size is 1 MB, and some files exceed this limit.
Task
Find all files larger than 1 MB in /tmp/app/ and its subdirectories, split each oversized file into 1 MB chunks in the same directory where the original file is located with a recognizable naming pattern (e.g., original_filename.part_aa), keep the original files intact, and verify that the chunks were created successfully.
Example
# Before (files exceed 1 MB limit)
/tmp/app/uploads/video.mp4 (3.2 MB)
/tmp/app/data/archive.tar.gz (2.5 MB)
Cannot upload due to size restrictions
# After (files split into 1 MB chunks)
/tmp/app/uploads/video.mp4
/tmp/app/uploads/video.mp4.part_aa
/tmp/app/uploads/video.mp4.part_ab
/tmp/app/uploads/video.mp4.part_ac
/tmp/app/data/archive.tar.gz
/tmp/app/data/archive.tar.gz.part_aa
/tmp/app/data/archive.tar.gz.part_ab
Chunks ready for upload within size limits
Terminal requires a larger screen
Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.
Linux Terminal Environment
Write and execute your solution in the terminal below.
Essential
Linux 0/29
AWS 0/10
Kubernetes 0/15
CI/CD 0/5
Networking 0/9
Need more practice in this area? Explore more questions →
GoDaddy
Accenture
Coinbase
Adobe
EPAM
Twitch
Amazon
Kayak
Autodesk
Lyft
Revolut
RedHat
Bloomberg
Datadog
Palantir
TCS
HashiCorp
Google
DeutscheBank
GitHub
Apple
Cloudflare
Stripe
Microsoft
NVIDIA
X
SAP
Spotify
Airbnb
Meta
Reddit
Yelp
Okta
Dropbox
Slack
ActivisionBlizzard
Zscaler
Uber
IBM
DeliveryHero
Robinhood
GitLab
Shopify
Samsung
Elastic
Twilio
Netflix
CrowdStrike
Ubisoft
Anthropic
Capital One
Splunk
Intel
AMD
Databricks