Hot answers tagged

6 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 ...
Iain Smith's user avatar
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(...
blis's user avatar
  • 51
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 ...
MatsK's user avatar
  • 2,746
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 ...
Milliways's user avatar
  • 59.5k
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 ...
Jim Russell's user avatar
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 ...
Dirk's user avatar
  • 3,541
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 ...
Seamus's user avatar
  • 21.7k
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.
Dirk's user avatar
  • 3,541
3 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 ...
Ingo's user avatar
  • 42k
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 ...
goldilocks's user avatar
  • 58.7k
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
Bra1n's user avatar
  • 1,251
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 ...
Piotr Kula's user avatar
  • 17.3k
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. ...
SDsolar's user avatar
  • 2,348
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 ...
David's user avatar
  • 683
2 votes

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 ...
Milliways's user avatar
  • 59.5k
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 ...
Seamus's user avatar
  • 21.7k
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 ...
Milliways's user avatar
  • 59.5k
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, ...
Heath Raftery's user avatar
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.
chkiss's user avatar
  • 11
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 ...
Milliways's user avatar
  • 59.5k
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 ...
Seamus's user avatar
  • 21.7k
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 -...
pramodcera's user avatar
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/...
goldilocks's user avatar
  • 58.7k
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 ...
Luis Diaz's user avatar
  • 483
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 ...
flakeshake's user avatar
  • 6,235
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, ...
Milliways's user avatar
  • 59.5k
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/ ...
Shan-Desai's user avatar
  • 1,531
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 ...
gboy's user avatar
  • 111
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" ...
Jacobm001's user avatar
  • 11.9k
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'...
monojohnny's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible