5
votes
How to find available space and free space if low
To get the available disk space with python you could use psutil
import psutil
path = '/'
bytes_avail = psutil.disk_usage(path).free
gigabytes_avail = bytes_avail / 1024 / 1024 / 1024
print(...
5
votes
Is there a way to compress a backup of the RPi because the backup has empty space?
Already answered here dd-on-entire-disk-but-do-not-want-empty-portion
Assuming you want to save /dev/sdXN to /tgtfs/image.raw and you are root:
mkdir /srcfs && mount /dev/sdXN /srcfs
Use ...
5
votes
Is there a way to compress a backup of the RPi because the backup has empty space?
https://www.raspberrypi.org/documentation/linux/filesystem/backup.md explains backup and restoration.
You don't indicate what OS you are using but it is simple on any 'NIX system.
I use the following ...
5
votes
Raspberry Pi Recognizes Logitech C920 Webcam But Can't Do Anything
I spent a number of hours recently with my C920 and a Raspberry Pi 3 recently to make a babyCam that I could stream within my home network. I may be able to shed some light but also provide ...
5
votes
Edit root files from SD card?
I basically didn't have a Keyboard I could use for my Raspberry Pi and was wanting to do the same.
I did this:
Insert the SD card into the MacBook
Open Applications > Disk Utility > right click on ...
4
votes
Why is the autostart a directory and not a file in .config on Pi 3b+
I assume you're running Rasobian Stretch.
No idea what you are talking about re directory / file. Standard lxde autostart file is '~/.config/lxsession/LXDE-pi/autostart'
But RealVNC server is ...
3
votes
How to get filename of newest file in directory?
This might do what you want:
$ ls -t | head -n 1
If not, you might try copying and pasting your question directly into your search engine. That's what I did to find this answer - it would work for ...
3
votes
Accepted
delete files instead of moving to wastebasket
Assuming you're using Raspbian...
Use [shift+delete]. And on right click: if you press [shift] after the menu opens, the option Move to Wastebasket changes to Remove.
3
votes
Accepted
Why create a link to .so file?
Far from a Pi specific question but:
First, -s is not a hard link. It's a symbolic, aka. soft one.
Is there an advantage or penalty?
Neither. However, doing this in /usr/lib (either copying or ...
3
votes
UTF-8 support on Raspberry Pi
File is not in utf8 format, so the decoder is seeing an invalid (i.e., non-utf8) byte sequence. 0xbd is the ½ character in Latin-1, utf8 represents it as the two-byte sequence \xc2\xbd
2
votes
Share files betweens two raspberry pis
If you just want to read the files, you can install nginx on your Pi and share the directory that has the files you want everybody else to read. This is read only, is pretty simple and very light ...
2
votes
Monitor directory for regular file creation and alert if the stream of files stops
You are correct about ifnotify - and kudos to you for discovering it. It cannot react to the absence of an event.
What you are going to want is a script or a python program to do as you described. ...
2
votes
Reverse the expand root FS
To shrink an existing image I will give an example with a Raspberry Pi OS Lite image that was backed up from an already used and expanded 32 GB SD Card.
This method is using a computer with a Linux ...
2
votes
Accepted
View files on a Raspbian SD Card from a Mac?
To view files from your EXT4 partition you'll need to download FUSE for macOS. This solution only lets you read, not write, but this should be enough to recover your files.
brew cask install osxfuse
...
2
votes
Accepted
Is it possible to write/save data/variables in Memory instead of the sdcard to extend the lifetime?
There is a 'wearout mechanism' in all SD cards. It follows that the less you write to any given SD card, the longer it will last. I think it's reasonable to be concerned about failures regardless of ...
2
votes
Is it possible to write/save data/variables in Memory instead of the sdcard to extend the lifetime?
Similar questions are asked often, usually by people who have no actual experience of failure.
There are means of minimising writes, but in 9 years with multiple Pi several running 24/7 I have only 2 ...
1
vote
I tried to hard wire power to pi 3 b, and smoked the board... File recovery?
All files are stored on the SD card. There is no other non-volatile storage on the Pi. Extracting the files from the SD card is tricky without booting from the SD card, so just pop it into another Pi, ...
1
vote
How to recover files?
You can try looking at the solutions here but they are quite advanced and I would say there's little chance of recovery unless you get quite lucky.
1
vote
SD Card Resize on 32gb SD Card Raspberry Pi
Your problem seems to be an extended partition which is only using 12.5GB.
It is unclear how you managed to get this, probably by copying a smaller SD Card.
This can be fixed on a Linux computer, it ...
1
vote
How can I modify an OS to constantly check for a file being open in a specific program?
I do not have a clear idea of what you are trying to do, so this is a generic answer. If this doesn't get you where you need to be, perhaps you can clarify your question. Anyway...
It sounds like ...
1
vote
Accessing files on a apache server from USB via PHP
I found the solution myself.
The trick is: linking the the two folders by a symbolic link
Opening terminal from within the "files" folder (/var/www/html/files on the Pi), and type:
sudo ln -...
1
vote
Accepted
How to extract mutipart rar files?
The information is obviously some years old; wheezy and buster are distro versions, the former being no longer supported. Your source.list should instead read:
deb http://archive.raspbian.org/...
1
vote
View files on a Raspbian SD Card from a Mac?
macOS can't (actually won't) show Linux ext4 partitions. There used to be 3rd party software to mount these, but Apple are making it more difficult with each new release, and AFAIK it is not possible ...
1
vote
Send encoder data to Mobile app using bluetooth
I think 1 second update it's to much for that application, I've found that sometimes, bluetooth data get "lost" if the messages are send to fast. Maybe 10-15 seconds update will be alright.
I'll go ...
1
vote
Is there a way to compress a backup of the RPi because the backup has empty space?
Shrink your second partition with gparted to eliminate free space and use dd to only backup the parts you need.
I suggest using a gparted Live CD (based on Linux) to modify RPi partitions. You can ...
1
vote
jessie PIXEL and file copy
I presume you are asking how to copy files in PCManFM which is the default File Manager in the latest Raspbian GUI. (PIXEL is the name of the Desktop Manager “Pi Improved Xwindows Environment, ...
1
vote
Accepted
How to make a python 3 file executable and pause after running
Keep all your executable files in a folder, I usually keep it in /home/pi/. Your folder can be called for example exec
mkdir exec
move your Python3 script into this folder:
mv myScript.py ~/exec/
...
1
vote
Directing mjpeg video to file w/ cvlc
I figured out what my problem was. I was using the wrong 'muxer'. When I switched to using the 'ogg' muxer, I was able to write to a file just fine. For the record, the command that is working for ...
1
vote
Accepted
linux system file writes to flash card, efficiency and flash endurance
Your understanding of the problem seems to underestimate the write life of the given flash memory.
"everything is a file" philosophy.
This is true, but only kind of. The "everything is a file" ...
1
vote
Sending files (Documents, videos etc.) Raspi to Raspi
If you have a file '/home/pi/Desktop/hello.txt' on 'raspberry1' and you wish to transfer it to 'raspberry2':
On 'raspberry1' : bring up a terminal.
Change into the directory where you file 'hello.txt'...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
file × 52raspbian × 13
sd-card × 8
server × 6
python × 5
boot × 4
usb × 3
filesystem × 3
root × 3
share × 3
pi-3 × 2
networking × 2
ssh × 2
bluetooth × 2
image × 2
samba × 2
data-transfer × 2
partition × 2
readwrite × 2
pi-4 × 1
hardware × 1
linux × 1
raspbian-stretch × 1
serial × 1
ubuntu × 1