date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,553,089,977,000 |
I have a bootable USB stick as shown in the screenshot:
# dd if=/path/to/os_image.iso of=/dev/sdb
(...everything OK...)
# sudo dumpe2fs /dev/sdb
dumpe2fs 1.42.9 (4-Feb-2014)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb
Couldn't find valid filesystem superblock.
GParted doesn't recognize an... |
Bootable usb thumb drive with 2 partitions.
Windows and others may only see the first partition on a usb device even when there are multiple partitions. Therefore make your first primary partition the fat32 or NTFS partition so windows can see and use it.
partition 1 - ntfs or vfat
partition 2 - ext4
The second partit... | FAT32 / NTFS + isofs on USB flash drive |
1,553,089,977,000 |
I sudo-copied documents from OSX extended filesystem to FAT32. Now, I see that two trees are different by size and by Stephen's command here
vimdiff <(find /Volumes/fat32/ -printf "%P %u:%g %m\n" | sort) <(find /Users/masi/BitTorrentSync/ -printf "%P %u:%g %m\n" | sort)
How can you copy lossless from OSX ext to FA... |
Since permissions do not matter, copying with cp -R is fine.
The command you're using to compare the two trees compares the file names, ownership and permission. If you don't care about preserving permissions, don't print out the permissions!
vimdiff <(cd /Volumes/fat32/ && find . | sort) <(cd /Users/masi/BitTorrentSy... | How To Copy Lossless from OSX ext to FAT32 without Ownership/Permissions? [closed] |
1,553,089,977,000 |
I'm trying to create an external hard drive with NTFS part for info and hidden bootable fat32 part.
Here is an error
.
|
I could be wrong, but it does rather look like you've got a filesystem directly on the disk, without any partition table.
If that is the case you cannot have additional partitions without wiping the disk and starting over, this time with a partition table.
| Gparted: too many primary partitions |
1,396,562,312,000 |
My Arch machine sometimes hangs, suddenly not responding in any way to the mouse or the keyboard. The cursor is frozen. Ctrl-Alt-Backsp won't stop X11, and ctrl-alt-del does exactly nothing. The cpu, network, and disk activity plots in conky and icewm stop updating. In a few minutes the fan turns on. The only way... |
Frederik's answer involving magic SysRq and kernel dumps will work if the kernel is still running, and not truly hung. The kernel might just be busy-looping for some reason.
The fact that it doesn't respond to Ctrl-Alt-Del tells me that probably isn't the case, and that the machine is locking up hard. That means hardw... | How to investigate cause of total hang? |
1,396,562,312,000 |
So recently I found that someone has been using my computer without consent, browsing folders, etc....
I could change all my passwords straight away, but I'm curious as the what the intruding party was looking for. So I would like to set up a trap ( evil grin ).
What software will monitor any activity on my computer?... |
You could use in-kernel mechanism inotify for monitoring accessed files.
First you should check if inotify is turned on in kernel:
pbm@tauri ~ $ zcat /proc/config.gz | grep CONFIG_INOTIFY
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
Next thing to do is install inotify-tools. Instructions for various distributions you could... | Monitoring activity on my computer. |
1,396,562,312,000 |
I couldn't find the answer to this anywhere. How can I know who renamed a directory?
ls -al shows only the name of user who created that dirctory.
|
That is not information that is normally recorded, unless you took special disposition to that effect (like via some audit system).
The service through which the user has renamed the directory (like over FTP, SFTP, WebDAV, samba...) may have logs that can help. You can try and check those logs, the last, lastcomm, aud... | Who renamed a directory? |
1,396,562,312,000 |
Is there a way to make sure that a file has been copied to a USB drive?
(Ex: I have a file secret.db and I suppose that my friend has copied it into his USB drive. With stat $filename I cannot see the updated a/c/m/time because cp doesn't update the timestamps).
Is there a way to know that or is it impossible?
I'm usi... |
TL;DR: In many cases, you can see whether the file was accessed; however, it is impossible to tell whether a copy was made or not.
It seems that atime would be updated when using cp (unless noatime is in effect); however, doing any other read operation (like grep somestring $filename) would also touch the file.
In mos... | How might one verify that a file has been copied? |
1,396,562,312,000 |
How can an administrator find the UID of a user that's been deleted with the userdel command?
|
By looking at /etc/passwd in the backups taken of your system from the day/week/period before the user deletion.
If userdel was used with -r, then both the home directory and user's mail spool have gone. If it wasn't used with -r, check for the user's mail spool, or perhaps a crontab if you're very lucky.
If there ar... | UID of a deleted account |
1,396,562,312,000 |
First, a brief description of the situation: a computer sits hidden near a display in a gallery of some sort, acting as the silent workhorse for a piece. Despite its programmer's best intentions the piece may, well, crash, from time to time depending on the passerby's interactions with the display. The programmer ha... |
Run ulimit -c 1073741824 prior to starting the program. Next time the program crashes, a core dump will be created in the working directory (named core.<PID>). You can then use GDB to open this core at any time you like.
ulimit -c XXXXX sets the maximum size of the core dump file created when a program seg faults. By ... | Capture and log GDB backtraces without stopping the process |
1,396,562,312,000 |
While Trying to mount a disk image in Raw(dd) format using the following command
mount nps-2010-emails.dd /media/manu/
I get the following error message
mount: you must specify the filesystem type
I know that using -t we can specify the file system but what is the terminology for
a RAW (dd) file, which can pe pa... |
The image you have is the image of an entire disk including things like partition tables and other things outside of the file system that you would like to mount inside it. You likely have at least one partition inside that raw blob. Mount is telling you it can't figure out what file system it is because it is startin... | Mounting Disk Image in Raw format [duplicate] |
1,396,562,312,000 |
There are two similar tools for a dd on bad hardware:
Kurt Garloff's dd_rescue
GNU ddrescue
What is the difference between dd_rescue and ddrescue, when to prefer which one?
|
GNU ddrescue first quickly copies good blocks using a large block size and then optionally tries to recover more data reading smaller blocks within the blocks that failed in the first pass. This requires a log file that records what areas are still missing and the output must go to a file or disk that allows random ac... | What is the difference between dd_rescue and ddrescue, when to prefer which one? |
1,396,562,312,000 |
My significant other and I are sometimes paranoid that a foreign government usually associated with last year's Gmail security breach may be attempting to gain access to our computers.
There were a lot of strange processes running as root tonight, though I have not opened any root terminals. Can someone please look at... |
That's a long list, surely you don't expect us to review it line by line? It's normal to have many processes running as root: unix systems often have one process to do each job, so many system services get their own process. In fact, some of these (e.g. all the /0 or / (the number identifies a CPU), and most of the on... | Is there any chance that some of these processes are malicious? |
1,396,562,312,000 |
I have a very strange case of DVD reading failure.
It's a video DVD recorded a couple of years ago on a DVD-R disc.
Two weeks ago our video DVD player would start having trouble reading parts of it. The problem was reproducible on two PCs, where only part of the videos could be played. Plus, current playing time and t... |
Initial Disk Quality
Since we're not talking about a hard drive here, which can be recovered, you're sadly experiencing the reality that most consumer grade DVDs are NOT reliable.
A physical hard disk has magnetic charged particles in a solid surface, and recovery in worst case scenarios happens by taking the disk apa... | Recovery of damaged DVD yielding "no medium found" error |
1,396,562,312,000 |
Answer
I fixed my "freezes" by turning autoneg of (ethtool -s eth0 duplex full autoneg off).
How I found this
Every time after a freeze, monitoring disk I/O with the help of the post below, I saw that rsynclogd was writing to disk after freezes. I then checked /var/log for the last changes and saw that kern.log had l... |
I recommend the dstat tool. It has a lot of plugins (listed via "dstat --list") that could help you narrow down where the issue is occurring.
One place to start could be with most expensive IO:
# dstat -s --top-io-adv --top-bio-adv
----swap--- -------most-expensive-i/o-process------- ----most-expensive-block-i/o-proc... | How can I see which process hangs my Banana-pi for few seconds every couple of minutes? |
1,396,562,312,000 |
Pertaining to computer forensics, if the suspect's computer (which cannot be removed from the scene), is Linux, can you directly use tools such as dd or dcfldd on his computer to acquire the disk image? Or do you need to use forensic live cds like Helix, Penguin sleuth or FFCU on top of the existing OS?
|
While running a command like
# dd if=/dev/sda of=/path/to/external/medium/file.img
on a live system will work, it's going to result in a number of problems which you won't have if you boot into a separate OS and make the image(s) from there:
If you image an entire disk, it probably contains a boot loader and a parti... | How to acquire image of disk on Linux computer? |
1,396,562,312,000 |
There is a process that I know was listening on a certain port that is no longer running.
I would like to know when it stopped running, if it crashed, or any other info about that process.
Is there a way to do this?
|
Generally speaking, there is not much that you can investigate if the process haven't logged anything implicitly or some kind of system wide logging solution was not deployed (most probably auditd).
Assuming you don't know what that process was trying to accomplish what you can do is:
Run last and last -f /var/log/b... | How to get info on a dead process that was listening on a particular port? |
1,396,562,312,000 |
Is there a way to recover an overwritten LUKS partition? Consider the following case:
I had a (external) hard drive (not SSD) which is completely LUKS encrypted containing an ext4 file system with some (important) data (in my case images and videos). The passphrase is known. I don't have a LUKS header backup.
Now I ac... |
I'm afraid there's no chance without a header backup.
The passphrase is only useful when a LUKS header is available that has that passphrase in a keyslot. Without that, there's pretty much no way to recover the volume key.
Part of the LUKS design is that if the LUKS header is erased (and any backups) then it's forensi... | Recover overwritten LUKS partition |
1,396,562,312,000 |
Cleaning up after a former employee, I've found that they accidentally included 800MB of data files in a commit to CVS years ago. Several other commits to the same project were made afterwards.
This data is extremely security sensitive and legally restricted and it needs to be removed completely (nothing hanging abou... |
You can delete the file from the Attic directory after removing it with cvs rm.
In your project directory, delete the file and commit the change:
cvs rm -f thefile
cvs commit -m 'deleted thefile' thefile
This moves the file thefile,v to the Attic directory in your CVSROOT/projectdir directory where you can delete it.... | how to remove dangerous stuff from old CVS commits? |
1,396,562,312,000 |
Is there a command that allows me to "see" the raw bits of a disk? In other words, to ignore the filesystem and output the "big picture" of the literal zeros and ones as per the disk. (Ideally not requiring a TB-size temporary storage.)
What I'm actually looking for is a way to easily tell if sections of the disk cont... |
Sparklines may help... first get the spark util and install the most text viewer.
This hack displays an abstract view of the first 61 sectors of
/dev/sda:
for f in `seq 0 1 60` ; do :
printf "%.03i %s\n" $f \
$({ printf '4294967295\n'
sudo dd if=/dev/sda skip=$f bs=512 count=1 2> /dev/nu... | Visualizing raw bits of disk |
1,396,562,312,000 |
In Windows, Autoruns tool is a really helpful tool for forensic investigators to help them find suspicious startup executables and filter the benign ones.
but i couldn't anything good like this in linux, so what is the easiest way to achieve what autoruns does in finding suspicious startup apps? any tool like that in ... |
basically lets say you are a forensic investigator and you are given a linux
system like Ubuntu, and are asked to find suspicious startup executables, how
will you do it and what tools will you use to fasten the process?
You can inspect every program executed on a machine using
forkstat. The output will contain
a to... | What is the equivalent of autoruns tool in linux for finding suspicious startup executables? |
1,396,562,312,000 |
I am using the latest Ubuntu Linux with a custom kernel (4.2.0-36-generic), in which I have disabled the CONFIG_STRICT_DEVNEM, because I need to dump and search some terms in memory during a project.
However, when using:
dd if=/dev/mem to print it on screen,
dd if=/dev/mem of=/home/user/Documents/file.dump to save it... |
I think you may run into some memory area used by PCI/ACPI or some such hardware. There might be a memory mapped device that doesn't like being accessed. I can't tell what address exactly causes the problem, but it's usual for some special areas to be located just under the 4 GB limit.
On one machine with 4 GB memory,... | Accessing /dev/mem freezes Ubuntu |
1,396,562,312,000 |
I'm trying to recover some lost files by grep-scanning a hard disk. (The OS is Darwin 11.4.2. The file system is HFS.)
How can I determine where a file (or contiguous chunk thereof) begins and ends on disk? I'm thinking of something along the lines of a generic beginning-of-file (BOF) and end-of-file (EOF) sequence... |
No general-purpose filesystem uses beginning-of-file or end-of-file sequences. They would be extremely impractical: what if a file contains these character sequences?
Most basic filesystems divide the storage into fixed-size blocks, and maintain a list of blocks for each file. The file size is kept separately, and how... | How are files or chunks delimited on disk? |
1,396,562,312,000 |
We had a human accident at home and an external hard disk was copied a SD 32gb image card by mistake. The copy should be done to a SD image.
I guess 32gb of the external drive were overwritten, but as far as my knowledge of digital forensics, the most of the information should be there.
Can you please recommend me a g... |
From my personal experience most filecarvers like to make assumptions based on which filesystems they detect. You could create a loop device with 32GB offset just to make sure your scanner/filecarver does not get sidetracked by seemingly valid data you're not interested in (i.e. skip the area you know was overwritten)... | How to scan a hard disk at low level to recover files in partially overwritten partition? |
1,394,277,393,000 |
This is on a Raspberry Pi.
Here's the output of sudo ls -lL /sys/class/gpio/gpio18:
-rwxrwx--- 1 root gpio 4096 Mar 8 10:50 active_low
-rwxrwx--- 1 root gpio 4096 Mar 8 10:52 direction
-rwxrwx--- 1 cameron cameron 4096 Mar 8 10:50 edge
drwxrwx--- 2 root gpio 0 Mar 8 10:50 power
drwxrwx... |
I solved the problem by adding cameron to the gpio group:
sudo usermod -aG gpio cameron
gpio export 18 out
echo 1 > /sys/class/gpio/gpio18/value
Now everything works.
| Unable to write to a GPIO pin despite file permissions on /sys/class/gpio/gpio18/value |
1,394,277,393,000 |
Can the default permissions and ownership of /sys/class/gpio/ files be set, e.g. by configuring udev? The point would be to have a real gid for processes that can access GPIO pins on a board.
Most "solutions" include suid wrappers, scripts with chown and trusted middleman binaries. Web searches turn up failed attempts... |
The GPIO interface seems to be built for system (uid root) use only and doesn't have the features a /dev interface would for user processes. This includes creation permissions.
In order to allow user processes (including daemons and other system services) access, the permissions need to be granted by a root process at... | Set GPIO permissions cleanly |
1,394,277,393,000 |
I have a daemon that monitors various things using the GPIO ports. I have used python to write the code for this using the RPi.GPIO module.
I would like to ensure that the daemon is always running, i.e., restart it after a crash and start it when the system boots (crucially before any user logs in -- this Pi runs head... |
That shell wrapper looks like an init script, but apparently it isn't (hence you need to use sudo there; scripts run by init would not require this).
This seems to be a very clumsy way to do this; the shell wrapper does not serve any purpose that could not be better served by the python program itself. Get rid of tha... | Running daemon involving GPIO on Pi |
1,394,277,393,000 |
I am writing some code around libgpiod's interface. For example, I want to set a line to output high. Under the hood, libgpiod opens an fd provided by the kernel for the line, and then calls ioctl(fd, GPIO_V2_LINE_SET_VALUES_IOCTL, ...).
My questions are:
Is this particular ioctl() call (with the GPIO_V2... argument)... |
GPIO_V2_LINE_SET_VALUES_IOCTL seems safe enough; it matches the expected use of ioctl, “manipulat[ing] the underlying device parameters of special files”. It is implemented in linereq_set_values, which acquires a lock, but I don’t think that lock can block for an indefinite amount of time (its users are all non-block... | Are ioctl calls blocking? |
1,394,277,393,000 |
Can a core be dedicated to one user-space app (e.g. for the purpose of bit-banging GPIO without any interruptions)?
|
You could use the kernel isolcpus option in conjunction with the taskset command.
On the Raspberry Pi reserve the core(s) you want to use by appending the following to the line in /boot/cmdline.txt.
E.g. to reserve cores 2 and 3.
isolcpus=2,3
Then use taskset to assign programs to the core(s).
E.g. to launch the Pyth... | Can one core on a multicore linux system be dedicated to one user-space app? |
1,394,277,393,000 |
I have a Raspberry Pi on Raspbian Stretch and I want to enable some GPIO pins at boot time.
I wrote the following service:
[Unit]
Description=GPIO23 exported as output, value off
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo "23" > /sys/class/gpio/export'
ExecStart=/bin/bash -c 'echo "out" > /sys/class/gpio/gpi... |
[Install]
Alias=gpio23.service
It's as simple as noting that there's no WantedBy setting in that section. You've told systemd to enable the service, but not actually described which target should want it when it is enabled.
StandardOutput=null
It is not wise to do this as an everyday practice. Let standard output be... | Why are systemd scripts not producing the expected results at boot, but correctly afterwards? |
1,394,277,393,000 |
I'm confused about the driver gpio_keys.
This driver distinguishes between two types of buttons:
IRQ-only buttons and GPIO-driven buttons
Could anyone explain the difference between one and another?
|
Disclaimer: I have not read the latest gpio_keys code, just skimmed over it. Yet, I believe that there is a good explanation for the separation of GPIO keys from IRQs.
A kernel has an IRQ event table, so different events can be given to known IRQs. The list of events (callbacks, well actually pointers) is written in... | Driver gpio_keys type of buttons |
1,394,277,393,000 |
On my embedded system, I can toggle a user led with: echo > 1 sys/class/leds/beaglebone:green:usr2/value.
Similarly, I can find the value of a GPIO (gpio60) (set to input), with more sys/class/gpio/gpio60/value
I've been trying to write a script to set the state of the user led based on that of the input. The followin... |
Maybe like this?
if [ $(cat sys/class/gpio/gpio60/value) -eq 0 ]; then
echo 1 > sys/class/leds/beaglebone:green:usr2/brightness
else
echo 0 > sys/class/leds/beaglebone:green:usr2/brightness
fi
| Basic script in Angstrom Linux running on a Beaglebone Black |
1,394,277,393,000 |
I am wondering where can I install this service that executes zsh script to run my script as soon as possible.
Script uses serial port at /dev/ttyS5 and gpio pins.
Is there a earlier target than multi-user.target that can still run zsh script?
[Unit]
Description=Acer projector control
After=multi-user.target
[Service... |
When considering this, you should refer to the chart in man 7 bootup, that describes the overall structure of systemd-based boot process.
You could specify WantedBy=sysinit.target, but then you'll need to specify a couple things in the [Unit] section:
[Unit]
DefaultDependencies=no
After=local-fs.target
After=systemd-m... | Where can I install systemd service that executes zsh script as early as possible |
1,394,277,393,000 |
I found this in my logs:
kernel: gpio gpiochip0: (gpio_aaeon): tried to insert a GPIO chip with zero lines
kernel: gpiochip_add_data_with_key: GPIOs 0..-1 (gpio_aaeon) failed to register, -22
kernel: gpio-aaeon: probe of gpio-aaeon.0 failed with error -22
What does it mean and how should I solve it?
lsb_release -a
No... |
Those messages are produced by the kernel General Purpose I/O code, apparently on trying to load the module that is introduced by this patch or its more developed equivalent.
Short version:
The module finds the WMI programming interface it's looking for, but overlooks the fact that the interface reports no controllabl... | What gpio gpiochip0 kernel error means and how to solve? |
1,394,277,393,000 |
We have an internal test system for our multi-platform software library which runs, with its zoo of third-party tools, inside an [Ubuntu] Docker container.
To keep things simple, the host machine AND the Docker container both run as the same user, test_user, fixed as UID 1000/GID 1000; this way volumes can be mapped b... |
Rather than persuading Docker of anything, just give test_user access to the gpiochips on both the host and docker_image. Then you can run Docker as test_user as before.
Typically on the Pi, the gpios are in the gpio group, so add test_user to that group (adduser test_user gpio), in both the host and the docker_image... | Docker with device [GPIO] access while running as a specified user that is not `root` |
1,394,277,393,000 |
I am trying to monitor GPIO events using libgpiod on the armbian linux.
Accourding to pinout of my device (BananaPI Zero M2 /w H3 allwinner chip)
I have pin CON2-P18 hooked on impulse button so I can test it.
First I'll find what line the pin is:
# gpiofind "CON2-P18"
gpiochip0 68
then I'll try to monitor it with gp... |
Going by the Allwinner_H3_Datasheet Section 3.3 ~pg80 (via link at the bottom of the Banana Pi page, only the EINT pins support interrupt.
According to the same Banana Pi page, CON2-P128 corresponds to PC4 on the H3, so not one of the PA or PG EINT pins and so no interrupt support.
Nothing the software, be it the kern... | gpiomon from libgpiod library seem not to behave correctly |
1,394,277,393,000 |
I'm trying to insert the [.]Ko (Kernel Object) file for the on-board GPIO into my Linux kernel which succeeds using the command insmod < file-name.ko > But when the OS/Device Reboots, the kernel no longer has the mod inserted (checking using lsmod). I have also tried placing it in /lib/modules/4.19.0-14-amd64/kernel/d... |
You could add your module to the modules.d folder, and it'll get picked up by systemd at boot time.
so make a file called /etc/modules-load.d/<featurename>.conf
and let it contain
<modulename>
where is the name of the .ko file without the .ko extension
you can get documentation for modules-load.d by typing man modul... | Cannot make persistant Insertion of a kernel object (debian) using Insmod |
1,394,277,393,000 |
I believe I could not fully understand the benefits of writing device drivers in embedded systems for some specific devices, such as GPIO, when there are alternative ways of doing the same job.
You can access the GPIOs via sysfs and device tree.
Write a new device tree overlay and enable it
Go to the /sys/class/gpio... |
The advantage of option 2 is that you can validate the request in a single place. Say for a dishwasher you can ensure the door sensor says the door is closed before you turn on the water. Sure you can tell people to check the door status bit before they set the water on bit, but will they all do so?
A potential disadv... | Driver development vs sysfs access vs mmap for GPIOs |
1,394,277,393,000 |
So I built an MLB scoreboard with a RPI 3. Right now the display can either show my favorite teams playing, OR all the teams playing and cycle through them as they are going on. I would like to add a toggle switch to the back of the scoreboard to select either the All-Teams or My-Teams depending on who's playing at th... |
So first off: you're doing GPIO things in your python script. Honestly, you should just use the very same library you use there (which I don't know) to read the GPIO state and behave accordingly! Same for your do python… ; sleep 10; done loop: this would really be something you should rather integrate in your python s... | How to read a pin state on a Raspberry Pi and select (either/or) between two entries in a cron file? |
1,394,277,393,000 |
I've a bunch of SSD1351 OLED displays like this one:
Those are driven over a SPI Interface and I use them in the Raspberry Pi and other ARM SBCs like the NanoPi with the following libraries:
https://github.com/rm-hull/OPi.GPIO
https://luma-oled.readthedocs.io/en/latest/
https://pillow.readthedocs.io/en/stable/
Thos... |
Apparently this was already done using a FT232H.
https://github.com/rm-hull/luma.oled/issues/185
| x86: Drive a SSD1351 OLED Display |
1,484,003,372,000 |
I have an HP DL380G9 server with two discreet nvidia graphics card installed running RHEL 6 with Kernel 2.6.32-573. Both cards have the same chipset (NV117) but different models. K620 (Slot 5 address 88:00.0), K2200 (Slot 4 address 84:00.0). The K2200 is the selected card for Linux to output plymouth and boot messages... |
I finally found this is done with a kernel feature called vga arbiter. Whichever VGA adapter is used as primary by the BIOS ends up being flagged a the "bootvga" device. Its possible to force vga arbiter to select and use the next vga adapter by using the stub driver for the undesired VGA adapter. Retrieve the pci dev... | Select graphics card for console output |
1,484,003,372,000 |
I am using ElementaryOS with the default Drivers and my Gala process is constantly using tons of CPU (sometimes more than 200%).
I have looked everywhere but couldnt find a solution. I tried to install the proprietary ATI drivers but then I can't login in the system (black screen).
My graphic card is an ATI Mobility R... |
I think I finally fixed it!
I need to create a xorg.conf file and add set the correct driver to radeon; it was fbdev before.
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
... | ElementaryOS Gala using more than 100% CPU constantly |
1,484,003,372,000 |
The machine has a NVIDIA GeForce 7350 LE graphics card, and I realised that I set up the wrong graphics driver when setting up an Arch Linux machine. I also chose the wrong versions of libgl and lib32-libgl in the course of downloading software.
The installed packages are: nvidia-libgl, lib32-nvidia-libgl, and mesa.
T... |
Let pacman handle dependency issues
I assume you have tried to simply install the wanted packages using (you might also want to pass --asdeps to pacman):
pacman -S nvidia-304xx lib32-nvidia-304xx-libgl
pacman should inform you about arising conflicts and ask you whether you want to remove conflicting packages: simply... | Replace Incorrect Packages which are Dependencies |
1,484,003,372,000 |
I wanted to compile a variant of mplayer and came across these options: VAAPI VDPAU.
I once read somewhere that one of these is for the newer graphic cards (like new gforce GT) and overlaps the other. Or I am totally wrong and they are different technologies for different hardware?
|
They both are used and supports different set of codecs. Even more some va-api drivers run nvdpau interfaces and vice versa.
Archlinux wiki is good at explaining some basic things with its tables, even non distro specific stuff, which aplies to many distros:
https://wiki.archlinux.org/index.php/VA-API
https://wiki.arc... | VAAPI or VDPAU which one is a newer Tech? |
1,484,003,372,000 |
I have current Debian testing, can't set resolution for display dell U2718Q:
# inxi -Gxx
Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
bus-ID: 00:02.0 chip-ID: 8086:0116
Display Server: x11 (X.Org 1.19.5 ) drivers: intel
Resolution: [email p... |
Sandy Bridge’s outputs don’t have enough bandwidth to support your monitor’s full resolution at 60Hz, however it should be possible to create a mode which will get you some of the way there.
This article gives details on the calculation process. In your case, the important factors are that your monitor’s native resolu... | Can't set correct display resolution |
1,484,003,372,000 |
I installed Debian 7 on an Asus Eee PC 2101HA.
Sometimes the screen goes black for 1 second.
My VGA card is VGA compatible controller: Intel Corporation System Controller Hub (SCH Poulsbo) Graphics Controller (rev 07)
|
There are several Intel drivers options which, if they don't work perfectly with your hardware, can cause issues like this:
The big one is lvds_downclock, but it defaults to off. If you've changed that default, that's the first one to try. (It's possible some kernel versions defaulted to on, so its worth a try to for... | Occasional screen blackouts on Debian 7 |
1,484,003,372,000 |
I tried to install Nvidia driver on my Asus laptop GU603H powered by rtx 3060 max-q mobile graphic card. I couldn't update my driver via GUI so I tried to tty1 using following steps:
1- purging all Nvidia related packages
2- install driver via .run file
At the final stage installation a message can be seen indicating ... |
To install NVIDIA driver on Ubuntu, use the ppa:graphics-drivers/ppa PPA.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
ubuntu-drivers devices
sudo apt install nvidia-settings nvidia-graphics-drivers-535
You will get the nvidia-smi again (a part of nvidia-utils installed as dependency)
Other m... | Nvidia driver install on Ubuntu 22.04.3 TLS |
1,484,003,372,000 |
Trying to install Archlinux on my laptop, I get a black screen after I pick Arch Linux archiso x86_64 UEFI CD and hitting Enter on the boot menu. I waited for about 10 minutes and the black screen persists.
I also tried hitting e and appending nomodeset or nomodeset i915.modeset=0 to the boot line before hitting Ente... |
Yaay, solved it. I changed the boot settings of BIOS to UEFI only and turned off CSM. Then, flashed the USB drive with the GPT partition scheme and ISO image. And it worked! Now I am at the archlinux terminal prompt.
| Black screen after booting archlinux installation program from usb drive |
1,484,003,372,000 |
How to know wich video card is present in my aix workstation?
I have tried:
lsdev |grep video
lsdev|grep vga
prtconf
but no info.
I see a vga is installed on workstation.
|
Solution found
lscfg |grep -i Graphic
+ lai0 U787F.001.DPM5MVH-P1-C2-T1 GXT135P Graphics Adapter
| AIX: show video card |
1,484,003,372,000 |
I've installed Bumblebee with Ryan McQuen's crazybee.sh script, described here, and I'm actually able to startx successfully now (because Bumblebee uses the on-board Intel graphics by default), but when I invoke optirun to run a program with the Nvidia card, I get:
[ERROR]Cannot access secondary GPU
Failed to initial... |
The issue was that the nvidia-kernel package of Bumblebee did not install, due to my lacking libvdpau.
| [ERROR]Cannot access secondary GPU…Failed to initialize the NVIDIA kernel module [closed] |
1,484,003,372,000 |
I have server with displays and a keyboard-mouse for displaying network map status and for use as a shell and virtual console in my server room. Need a recent video card that is > $100 that can support the hardware requirements. I do not need to do any heavy rendering, but multiple open windows and graphics on Gnome2... |
The only meaningful advantage in buying an ATI or Nvidia card is to use them for hardware accelerated OpenGL rendering, generally in 3D. Otherwise they are just a waste of power and money.
The only thing which makes use of openGL on a general purpose GUI desktop are some DE specific special effects such as a "spinn... | Graphics card recommendation, Dell PowerEdge R210 & CentOS 6.5 [closed] |
1,562,250,320,000 |
I have two commands, one that lets me record my screen to an AVI video file, and another which lets me stream a video file as a (fake) "webcam". This is really useful in apps that doesn't support selecting one screen to share (I'm looking at you Slack).
command #1 (https://askubuntu.com/a/892683/721238):
ffmpeg -y -f ... |
Solved.
Steps to solve:
Unload previous v4l2loopback sudo modprobe -r v4l2loopback
git clone https://github.com/umlaeute/v4l2loopback/
make && sudo make install (if you're using secure boot, you'll need to sign it first https://ubuntu.com/blog/how-to-sign-things-for-secure-boot)
sudo depmod -a
Load the videodev drive... | How can I stream my desktop/screen to /dev/video1 as a (fake) "webcam" on Linux? |
1,562,250,320,000 |
I'm using a RTP pipeline to stream video from a camera over local network.
The pipeline is: camera > h264enc > RTP > UDP > receiver_and_display
How can I find out how the latency is composed?
|
Nowadays GStreamer has really nice tracers mechanisms to measure latency as for the whole pipeline or for individual elements
This is how this can be done with gst-launch
env GST_DEBUG="GST_TRACER:7" \
GST_TRACERS="latency(flags=element+pipeline)" \
GST_DEBUG_FILE=./latency.log \
gst-launch-1.0 -v videote... | Measuring latency in a GStreamer pipeline |
1,562,250,320,000 |
I would like to access my security camera that communicates through rtsp feed with an API that only supports a character video kind of entry (I'm new on linux, and I'm not sure if it's called "character video" the '/dev/video1' sort). I followed this post and I get the output below for the following command:
gst-launc... |
I've got the rtsp streaming on '/dev/video1' working with the following command:
ffmpeg -i rtsp://admin:[email protected]:554/CH001.sdp -f v4l2 -pix_fmt yuv420p /dev/video1.
Thank you guys for the great support.
| How to access a security camera and covert it to /dev/video? |
1,562,250,320,000 |
I'm trying to forward video file to the framebuffer on my device that has no X. I'm using gstreamer with fbdevsink plugin.
When I test it with
gst-launch-1.0 videotestsrc ! fbdevsink
it works perfectly.
However when I try to open any video file on my device with command
gst-launch-1.0 filesrc location=right_top1.mp4... |
I finally drop gstreamer and used ffmpeg without any more issues.
Command looks like this:
ffmpeg -fflags nobuffer -flags low_delay -rtsp_transport tcp -stimeout 1000000 -i <RTSP_stream_addr> -pix_fmt bgra -loglevel
| Got EOS from element "pipeline0" on gst fbdevsink |
1,562,250,320,000 |
I have been trying to play live streams on youtube, but it does not play any at all.
Everything it says its that the browser does not support it (html5).
So what packages are missing in order to being able to play it?
Kernel> 4.18.7 (64 bits)
Opensuse thumbleweed
Firefox 68.0.1
UPDATE
Thanks to Ned64, I discover tha... |
You need the x264 media player in Firefox by Cisco which is usually already built-in (do not install anything). Please check it by looking at the list of installed plugins within Firefox: Menu: Add-Ons -> Plugins
Reference: Firefox's Open-H.264 plugin
You could, now, however, be hit by this new bug here:
Bug: Firefox... | What packages are needed for playing live streams of youtube? |
1,562,250,320,000 |
While trying to solve an issue about loading MPEG videos in Matlab, I found several suggestions to install the FFmpeg plugin for Gstreamer.
However, I can't find this functionality on Debian 9 [1]. It was available on Debian 7, though [2].
This is not really an XY question. I'm still looking for alternatives for my is... |
It was renamed to gstreamer-libav
| What happened to gstreamer-ffmpeg and can I replace it? |
1,562,250,320,000 |
I'm trying to share my computer's camera with the remote computer. In order to do this, I wanted to share my own computer's camera with the udp port(stream), take the stream on the remote computer and put it on the virtual camera. So I thought I could use my own camera on platforms like google meet with my remote comp... |
I could not convert the video stream using GStreamer. But ffmpeg works for me. I started sending and receiving video streams using Ffmpeg for both remote and local machines.
For Local Linux Machine:
ffmpeg -i /dev/video0 -f mpegts udp://<ip>:<port>
For Remote Linux Machine
ffmpeg -i udp://<ip>:<port> -f v4l2 /dev/vid... | How to convert stream data which come over udp to video device? |
1,562,250,320,000 |
I have a computer that runs Debian Stretch which has Gstreamer 1.0 installed. I am trying to run a Processing sketch that uses the Processing video library which in turn relies on Gstreamer 0.10. This produces a runtime error because they removed a symbol gst_object_sink.
It seems a PITA to try to rebuild the Processi... |
It is perfectly possible to install multiple versions of a library in Debian. Pinning is the way to go. In this case I decided to obtain libgstreamer0.10 from Debian Unstable (running Debian Testing myself).
Create the file /etc/apt/sources.list.d/unstable.list with contents:
deb http://ftp.nl.debian.org/debian/ unsta... | Is it possible to install both Gstreamer 0.10 and Gstreamer 1.0 at the same time? |
1,562,250,320,000 |
I've created a couple of v4l2loopback devices for use as virtual webcams, and have been able to get Chrome to recognize them via navigator.mediaDevices.enumerateDevices(). I've also been able to construct gstreamer pipelines to send video and image data to these virtual webcams. what I haven't been able to do is des... |
The generic v4l2 standard doesn't know anything about "front-facing" and "back-facing" or "side-facing" cameras.
Such an attribute mostly (only?) makes sense when it comes to smartphones.
It doesn't make sense for my good old analog camera nor my USB Webcam nor my builtin laptop webcam, all of which I've used with v4l... | how do I set properties of a v4l2loopback device and make them visible to my web browser? |
1,562,250,320,000 |
I'm currently trying to get Mic-in and Line-in monitored on Headphones port and Line-Out, respectively.
I tried with aplay / arecord even with alsamixer configuration; it doesn’t work.
How can I make this work?
Here is what aplay -l and arecord -l gives me:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ... |
Ok, let's look at the codec. The codec description is a graph representation of the analog parts of the codec chip. Go through the description node by node, and make a picture as you do that (connection describes the input nodes), you are going to need it.
Your codec has actually 3 D/A converters, for Line Out, Speake... | Alsa: get audio from specific Input to specific Output stream for monitoring |
1,562,250,320,000 |
What yum repository provides gstreamer-plugins-ugly (or/and other gstreamer plugins) for Red Hat Linux 6? And do repositories for CentOS and Fedora suit for Red Hat?
Reason of this question is that explicit query of RHEL repositories in Google leads to CentOS and Fedora repositories but as far as I know problems with ... |
´gstreamer-plugins-ugly' : You can search http://rpm.pbone.net/index.php3 and see the available repo´s : rpmfusion.repo, el.repo, nux.repo, atrpms.repo, repoforge.repo (= rpmforge.repo ).
One is compatible with the Redhat repo : That's rpmfusion : http://rpmfusion.org/ >>> http://download1.rpmfusion.org/free/el/updat... | rhel repositories with gstreamer-plugins-ugly |
1,562,250,320,000 |
I see the following repositories when I do a repolist:
1) google-chrome
2) rpmfusion-nonfree
3) rpmfusion-nonfree-updates-testing
But commands like yum install vlc and others line yum install gstream-plugins-ugly do not not work.
I tried installing the free rpmfusion repos
[root@dhcp223-30 yum.repos.d]# sudo rpm -iv... |
Reworked answer based on new info; and a couple of quick edits subsequently -
What Happened to your Fedora Repos?
Did you edit out the fedora repos from your dnf repolist outputs?
Because you don't appear to have them...
And maybe lets confirm you are running fedora 23 :) cat /etc/redhat-release
Assuming you are trul... | Unable to install video plugins for fedora 23 |
1,562,250,320,000 |
I recently installed gstreamer-ffmpeg-0.10.i686 on RHEL 7. As a result of this text in my java program has become slightly larger (maybe 2 or 3 font sizes), which is enough to mess with some of the UI elements. My guess is that gstreamer-ffmpeg or one of its dependencies is adjusting global font settings.
I tried doin... |
This was a result of one of its dependencies: font-config, which sets the default font for many things.
| Why does gstreamer-ffmpeg change the fonts for java applications? |
1,562,250,320,000 |
Starting recently, about 2-3 weeks ago, I believe after some update, Clementine stopped playing OGG files. All other formats that I have play without any issues. At the same time VLC can play these same OGG files.
When it fails, Clementine pops an error window with the following message only: Internal data stream erro... |
I think I was having the same problem, or at least the same symptoms, on Ubuntu 20.10. It was affecting Clementine and gst-play-1.0 from the command line in the same way. Problem started after upgrading from 20.04. In my case it only affected a few albums in my collection out of ~680 ogg files. Turns out it was a ... | Clementine with GStreamer can't play OGG files |
1,562,250,320,000 |
I'd like to create a dynamically named audio source that can then be referenced by other programs on my system. For example something like this:
gst-launch-1.0 audiotestsrc ! alsapubsink name='Test Source'
and then I'd reference it in other programs like:
gst-launch-1.0 alsasrc device='Test Source' ! ... ! autoaudios... |
In Pulseaudio: Make a "null" sink
pacmd load-module module-null-sink sink_name=public-sink-1 sink_properties=device.description=Public-Sink-1
then use pavucontrol, command line options or application menu options (if available) to redirect all sound output you want to "reference" to this sink.
Every Pulseaudio sink h... | How can I "publish" an audio source for consumption by other programs using ALSA and/or Pulse? |
1,562,250,320,000 |
I am using Fedora 28. I'm trying to run this code
from PyQt5.QtCore import QCoreApplication, QUrl
from PyQt5.QtMultimedia import QMediaContent, QMediaPlayer
from PyQt5.QtWidgets import QApplication
import sys
import os
def handle_state_change(state):
if state == QMediaPlayer.LoadingMedia:
print('loading'... |
I have the same problem with Qt5.10.
I must go back to Qt5.8 to get it working.
| PyQt5 QMediaPlayer defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer" |
1,562,250,320,000 |
I have the following problem with the Gstreamer player gst123:
when I'm playing back folders gst123 does not play the files in alphabetical order. When I have my files ordered like this:
01.mp3
02.mp3
03.mp3
I would expect the player to play the files back in this order, which it doesn't. I also did not really grasp ... |
There is no requirement that the entries are stored in any particular order. Programs like ls typically sort them, and the shell also sorts them when it expands filenames. The sorting is determined by the locale, and in particular the LC_ALL or LC_COLLATE environment variables. You can create custom locales if you wou... | gst123 does not play files in right order when playing back folders/ |
1,562,250,320,000 |
I am running Ubuntu 20.04 on a Lenovo Thinkpad X1 Tablet. A few years ago I wrote a bash script using soundconverter to transcode some of my music to mp3 files when I need to use a player that only has mp3 capability (like my car and my swimming player). I tried to use my script recently and got the following error
... |
I realize this is an (relatively) old post, but I was just struggling with this in Ubuntu 20.04, and I though I'd share my workaround.
First, I was getting three error messages with the version of Sound Converter installed with Ubuntu 20.04:
Failed to load module "appmenu-gtk-module"
id3mux gstreamer element not foun... | Soundconverter error encoding to mp3 |
1,562,250,320,000 |
I have a VM with ROS Noetic installed and I want to run a camera calibration on my USB Webcam. I followed the following guide and for the launcher, I put the following code:
<launch>
<!-- This launchfile should bring up a node that broadcasts a ros image
transport on /webcam/image_raw -->
<arg name="DEVICE... |
For the "invalid ROS_HOSTNAME" is connected with the environment variables.
Look at this page:
https://wiki.ros.org/ROS/EnvironmentVariables
The assumption here is that your Cam is compatible with ROS.
Have you try this before calibration:
roscd gscam
cd bin
export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-ra... | ROS Camera Calibration GStreamer Error |
1,562,250,320,000 |
I'm using LibreOffice Impress on Arch Linux to make a presentation. When I embed a video into my presentation, the video initially plays fine, but gets distorted after a few seconds. The distortion seems to involve a combination of screen tearing, flickering, and other things. I read here that LibreOffice requires gst... |
I was able to work around this problem by changing the SAL_USE_VCLPLUGIN environment variable in the file /etc/profile.d/libreoffice-still.sh. Originally, all lines in that file were uncommented, which I think made SAL_USE_VCLPLUGIN default to gtk3. I seemed to fix the problem by uncommenting the export SAL_USE_VCLPLU... | LibreOffice distorts embedded videos |
1,562,250,320,000 |
Why are GStreamer packages always named gstreamer1-*? What is 1? Why not just gtsreamer-*?
|
GStreamer comes in two primary release flavours: the old, deprecated, unmaintained 0.10 release series and the new, shiny 1.x releases.
Some Linux distributions or software providers may still make the older releases available for compatibility with old software (although I can't find any Linux distribution that still... | Why are GStreamer packages always named "gstreamer1-*"? |
1,562,250,320,000 |
I am trying to run the rtpbin example an Ubuntu 21.10 VirtualBox VM with GStream 1.18.5.
I set up GStreamer and have been able to run many of the basic and playback tutorials.
I've also read through a good portion of Application Developer Manual.
Doing everything from C code seems straightforward but the rtpbin exam... |
I was almost ready to submit my question and I did one more Internet search. I found this tutorial which shows several extra flags added to the udpsrc and udpsink elements. Adding the following flags got the example working so that I could see video and hear sound via RTSP:
host=127.0.0.1 on all udpsink elements
addr... | Why does rtpbin example from Gstreamer not work? |
1,562,250,320,000 |
With this script
#!/bin/sh
videodevice="/dev/video0"
alsadevice="hw:2,0"
gst-launch-1.0 -q v4l2src device="$videodevice" do-timestamp=true norm="PAL" pixel-aspect-ratio=1 \
! video/x-raw,format=YUY2,framerate=25/1,width=720,height=576 \
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
! mux. ... |
Solution found: before launch gstreamer the card must be "unmute" with this command.
v4l2-ctl -d /dev/video0 --set-ctrl mute=0
| gstreamer and vhs capture: video ok, but sound mute |
1,562,250,320,000 |
I'm using a Raspberry pi zero with a Bluetooth dongle and I'm trying to play an mp3 file to a Bluetooth speaker. I managed to get them both connected after a lot of trying, this is the full list of commands I execute to get everything working:
rfkill unblock 0
sudo hciconfig hci0 up
sudo hciconfig hci0 piscan
pulseaud... |
It turns out the were two issues with what I was doing:
Gstreamer does sometimes support mp3 files, see this link for the formats it does support. Replacing the filesrc with audiotestsrc ! convertaudio fixes it, although I'm not sure why it needs to be converted.
Because the Bluetooth device is an audio target I nee... | Gstreamer ' The stream is in the wrong format.' |
1,419,660,692,000 |
I have a binary file I would like to include in my C source code (temporarily, for testing purposes) so I would like to obtain the file contents as a C string, something like this:
\x01\x02\x03\x04
Is this possible, perhaps by using the od or hexdump utilities? While not necessary, if the string can wrap to the next... |
You can almost do what you want with hexdump, but I can't figure out how to get quotes & single backslashes into the format string. So I do a little post-processing with sed. As a bonus, I've also indented each line by 4 spaces. :)
hexdump -e '16/1 "_x%02X" "\n"' filename | sed 's/_/\\/g; s/.*/ "&"/'
Edit
As Cengi... | How to dump a binary file as a C/C++ string literal? |
1,419,660,692,000 |
On my machine I get the following output when I run these commands:
$ echo foos > myfile
$ hexdump myfile
6f66 736f 000a
The output from hexdump is little-endian. Does this mean that my machine is little-endian, or does hexdump always use little-endian format?
|
The traditional BSD hexdump utility uses the platform's endianness, so the output you see means your machine is little-endian.
Use hexdump -C (or od -t x1) to get consistent byte-by-byte output irrespective of the platform's endianness.
| Does hexdump respect the endianness of its system? |
1,419,660,692,000 |
The binary file has strings and some numbers, If I do
od -c filename or strings filename, I can see the strings properly. But, what about numbers? They are in some weird format.
The text after doing od -c filename is like this:
0000000 036 \0 032 004 S D \0 \0 \0 \0 s e q 1
0000020 \0 \0 ... |
There are lots of ways of storing numbers - ASCII (which can have locale specific variants, such as using ',' to separate fractional part OR as a thousands grouping), binary integer (variable number of bits)/float/double (all of which may vary depending on endian architecture and whether software producing the file fo... | How to interpret an octal or hex dump of a binary file? |
1,419,660,692,000 |
I've been doing an exersice in attempt to understanding some of what's going on under the hood of a program. I wrote a small C program, and compiled it on i386 Linux (Ubuntu 12.04) using gcc. I then did a hexdump -C on the output to text file. I noticed that there were some gaps on the offset with an *:
00000670 0... |
Like in the standard od command or hd, it means all the elided lines are the same as the preceding line. You can pass -v to make it display those lines anyway. From hexdump(1):
The -v option causes hexdump to display all input data. Without the -v option, any number of groups of output lines, which would be identica... | What does `*` mean using hexdump -C? |
1,419,660,692,000 |
If I opened hexdump without any argument in the terminal:
hexdump
When I type something in the terminal and press Enter, hexdump will display the hex values for whatever characters I type.
But hexdump will only display the hex values if I type 16 characters, for example:
Here, I typed the character a 15 times and I ... |
Try hexdump -v -e '/1 "%02X\n"'. That displays one hex byte per line, so the line output buffering won't stop the line from being displayed.
Then you only have to type A and return to know the hex value for A. You still have to type return, because the shell buffers also does line buffering on the input.
man ascii als... | How to make hexdump not wait for 16 characters from stdin to display their hex values? |
1,419,660,692,000 |
Say for example I've got this C function:
void f(int *x, int *y)
{
(*x) = (*x) * (*y);
}
When saved to f.c, compiling with gcc -c f.c produces f.o. objdump -d f.o gives this:
f.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <f>:
0: 55 push %rbp
1: ... |
You can extract the byte values in the text segment with:
$ objcopy -O binary -j .text f.o fo
The -O binary option:
objcopy can be used to generate a raw binary file by using an output target of binary (e.g., use -O binary). When objcopy generates a raw binary file, it will essentially produce a memory dump of the ... | Get hex-only output from objdump |
1,419,660,692,000 |
What is the difference between the od, hd, hexdump and xxd commands ?
They are all commands for dumping files and they can all dump it in various formats such as hexadecimal, octal or binary. Why creating different programs ?
|
Unix, of which Linux is just one flavour, has a long and rich history. It has not been developed by a single company or group, nor following a master plan, and has evolved by adaption to many niches. You can find many examples where multiple tools cover similar or the same functionality. They have been implemented by ... | What is the difference between the od, hd, hexdump and xxd commands? |
1,419,660,692,000 |
I know that xxd is used to convert texts to hexdump but I want to do the opposite: convert an hex dump to text! Is there some command that I can use? Thanks for the help!
|
xxd can also convert the other way
xxd -r
| How to convert hexdump to text? |
1,419,660,692,000 |
I have a file I created (in vim), for testing purposes (testing UTF-8 output in an SSH client). Odd things, however, are happening to this file.
I wondered what bytes were in the file, so I used hexdump:
username@computername:~$ hexdump -x intl.txt
0000000 9ecf 000a
0000003
Ok, there's four bytes in there, How ... |
As others have pointed out, this is because hexdump -x treats the files as containing 2-byte words. On little endian systems (almost all desktops are), this means the bytes will be swapped before they are displayed. This means that the byte values are printed in pairs and that the order of these bytes are swapped. Sin... | Why do ls and hexdump disagree about my file size? |
1,419,660,692,000 |
I really like hexdump, especially because you can define a custom format; say:
$ echo -e '\x00\x01\x02\x03' | hexdump -v -e '1/1 "%_ad: "' -e '4/1 "%02X "' -e '1/1 " : "' -e '4/1 "%_p"' -e '1/1 "\n"'
0: 00 01 02 03 : ....
4: 0A : .
So, I can choose to have, say, 4 bytes per line, written as hexadecimal first... |
Failing a dump program with suitable dump options, you can always cobble something together by using both hexdump and xdd and then joining the output with paste. Its not pretty, but using a shell that supports process substitution (bash will do):
mkfifo fifo
echo -e '\x00\x01\x02\x03' |
tee fifo |
paste -d' ' \
... | Achieving hexdump-like format, that includes binary strings, on the command line? |
1,419,660,692,000 |
I'm trying to get the output of my hexdump command to look similar to hexedit default. I've been playing with the format strings using -e, but since there are not very good documentation, that visually describe how to use it, I am failing to get it right.
Currently, I have:
# hexdump -C -n 0x100 m1.bin
00000090 00 00... |
Not that simple nor obvious... try
hexdump -v -e '"%08.8_ax "' -e' 4/1 "%02x " " " 4/1 "%02x " " " 4/1 "%02x " " " 4/1 "%02x " ' -e '" |" 16/1 "%_p" "|\n"' file
| How to get Hexdump output in same format as hexedit? |
1,419,660,692,000 |
I see sometimes star symbol (*) in the hex editor, like
...
00001d0 0000 0000 0000 0000 0000 0000 0000 0000
*
00001f0 0000 0000 0000 0000 0008 0000 0000 0000
...
It is probably some sort of separator.
However, there are many other separators too.
What is the meaning of this star symbol in hex data?
|
It means that one or more lines were suppressed, because they are identical to the previous line; in this case, it means that the line starting at 00001e0 is all zeroes, same as that starting at 00001d0.
To determine the number of deleted lines, you need to look at the addresses involved and the length of each line; i... | What is the meaning of Star symbol * in Hex data? |
1,419,660,692,000 |
I created a simple file, 1.txt:
echo "hello" >> 1.txt
Then I dumped it:
hexdump 1.txt
And the terminal output:
0000000 68 65 6c 6c 6f 0a
0000006
What do 0000000 and 0000006 mean?
|
0000000 in this example is the offset (hexadecimal, counted from the start of the file) of the first byte printed in a particular line.
0000006 in this example is the number (in hexadecimal) of bytes in a file. There are five characters in the word "hello" and a line feed character (0x0A).
Try echoing a longer text or... | What do these numbers in a 'hexdump' of a file mean? |
1,419,660,692,000 |
When run from a terminal, hexdump does not react to a single ^D at the beginning of the line, as cat, od, bc, etc. do, unless there was no input yet:
prompt% hexdump -C
<control-D>
prompt% hexdump -C
hello
<control-D><control-D> # a single ^D won't do
00000000 68 65 6c 6c 6f 0a |hello.... |
Thanks to @JdeBP for the hint, I was able to create a small testcase that does the same as hexdump:
#include <stdio.h>
int main(void){
char buf[64]; size_t r;
for(;;){
printf("eof=%d, error=%d\n", feof(stdin), ferror(stdin));
r = fread(buf, 1, sizeof buf, stdin);
... | Why does hexdump try to read through EOF? |
1,419,660,692,000 |
Why does hexdump seem to miss out parts of the file, while xxd does not? The file is 32 bytes. So xxd output is correct.
$ xxd test.bin
0000000: 8888 8888 8888 8888 8888 8888 8888 8888 ................
0000010: 8888 8888 8888 8888 8888 8888 8888 8888 ................
$ hexdump -n32 -x test.bin
0000000 8888 888... |
Because you didn't add the -v option to hexdump.
-v Cause hexdump to display all input data. Without the -v option, any number of groups of output lines, which would be identical to the immediately preceding group of output lines (except for the input offsets), are replaced with a line comprised of a single asterisk... | Why do I get different output from hexdump compared to xxd? |
1,419,660,692,000 |
Suppose we want a minimalist one-byte per line ASCII hex dump. Under Linux using GNU od, this works:
echo foo | od -An -tx1 -w1 -v
Output:
66
6f
6f
0a
But that won't work with BSD derivatives, because the BSD od util has different flags.
What's the most portable *nix method? Failing that, what are the best ava... |
od is a standard command. In od -An -tx1 -w1 -v, the only thing that is not POSIX is the -w option.
You can replace it with:
od -An -vtx1 | LC_ALL=C tr -cs '0-9a-fA-F' '[\n*]' | grep .
Which would work in any POSIX-compliant system and does work on FreeBSD at least:
$ echo test | od -An -vtx1 | LC_ALL=C tr -cs 0-9a-f... | Portable one-byte per line hex dump |
1,419,660,692,000 |
I want to read /dev/input/mice with hexdump. Format is described at here at StackOverflow. What I need is to read one byte (flags), print it in hex format, then read two bytes (x and y move offset) and print each in signed decimal format.
I use hexdump from util-linux 2.28 on Arch Linux.
The best I was able to put tog... |
This appears to be a bug in that implementation of hexdump.
The function responsible is
print(struct hexdump_pr *pr, unsigned char *bp)
in hexdump-display.c. It copies the correct number of bytes into a suitable variable, so that sign-extending can happen when passing the value to printf(). But for single bytes, it... | Print one byte signed number with hexdump |
1,419,660,692,000 |
I am trying to display a binary file with records consisting of:
8 bytes unsigned int
4 bytes unsigned int
4 bytes unsigned int
4 bytes unsigned int
4 bytes unsigned int
I try to display it using hexdump as follows:
hexdump -v -e '1/8 "%015d " 4/4 " %6d" "\n"' binfile
But I get:
hexdump: d: bad byte count
I am usin... |
According to the man page,
%d, %i, %o, %u, %X, %x Four byte default, one, two and four byte
counts supported.
And there doesn't appear to be any integer type where eight byte is supported (you'd also need %u, not %d for unsigned ints).
You could use perl instead here:
perl -ne 'B... | Bad byte count while using hexdump |
1,419,660,692,000 |
I have a Java class which the compiler refuses to compile due to \ufeff at the start of the file. I can view the fact that the BOM is present by vim -b file.java, but neither xxd nor hexdump show the two bytes. Is there some way to make them do so?
|
The U+FEFF character is encoded in UTF-8 over 3 bytes: ef bb bf.
xxd or hexdump shows you the byte content, so those 3 bytes, not the character that those 3 bytes encode like vim -b does.
To remove that BOM (which doesn't make sense in UTF-8) and fix other idiosyncrasies of Microsoft text files (which is likely the so... | Why does xxd not show the byte order mark? |
1,419,660,692,000 |
I'm trying to display a hexdump of a file and highlight carriage returns in red. I'm having a really hard time understanding the format of the formats option (-e).
Is it something like:
hexdump -e "_L[red:0A]" practice_file_1.txt
?
I'm slowly solving the puzzle, but I probably don't know a higher level knowledge base... |
Here is a quick example:
hexdump -f foo.cfg foo.log
and foo.cfg contains
"%06.6_ao " 12/1 "%3_c_L[red:0x0a] "
"\n"
and the result only colors when writing to a terminal (not redirected). Looking at the result by capturing the output using script, the result looks like this in a text editor:
Script started on Fri 0... | Hexdump format syntax - color |
1,419,660,692,000 |
I am using hexedit to show/edit disk MBR (512 Bytes, copied with dd).
When I open the file, hexedit displays the file as 9 columns, 4 bytes
per column (36 bytes per line). That is very unfortunate. I need to have
it aligned in a meaningful way (ie 8 columns, 32 columns per line)
I could not find any way to do it in th... |
Apparently it keys off of the width of your terminal. If you size the terminal just right you can get hexedit to show you 8 columns instead of 9.
Example
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
00000020 00 00 ... | hexedit: change number of columns (bytes per line) |
1,419,660,692,000 |
I have object of class
class X {
private DateTime dt;
"constructor, set/get"
}
I have one instance of this object serialized in file.bin.
I want to show content of `file.bin on the Linux console in human readable way.
|
You can display the contents of a file with cat, but with binary files that will often result in "garbage". For binary files you can use od -x (or xxd):
od -x file.bin
that makes everything byte readable as hex words for any file (understanding what that means is more difficult and dependent on the program that wrote... | Convert serialized Java object to human readable |
1,419,660,692,000 |
I saw this question Why does Ctrl-D (EOF) exit the shell? and wanted to try the example on the second answer.
So i've created a file and used hexdump:
federico@home ~ $ cat > test.txt
prova
^C
federico@home ~ $ hexdump test.txt
0000000 7270 766f 0a61
0000006
The second row has '6' in the end... |
You are using a little endian CPU, the 16 bit words hexdump is showing are byte swapped.
6 is the offset of the second dump line which is empty, your file containing only six bytes.
Use od -c or od -t x1 to get the expected order:
$ od -c test.txt
0000000 p r o v a \n
0000006
$ od -t x1 test.txt
0000000 7... | Strange ascii from hexdump of text file |
1,419,660,692,000 |
When I was scrutinizing the DNS query sent by the dig, I found something odd from what RFC's state. I don't know the different variants of DNS protocols out there, but from RFC 1035
Z : Reserved for future use. Must be zero in all queries and responses.
This is the memory snapshot of the received DNS query, expor... |
There are no multiple variants of DNS, but RFC 1035 on this subject was amended by RFC2535 "DNS Security Extensions".
Its section 6.1 shows the message format:
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+-... | Understanding the dig's DNS query: Does dig set non zero value for Z field? |
1,419,660,692,000 |
I am trying to find the creation date on an ext2 file system. I seem to get a current date using dumpe2fs.
The problem is that the original ext2 superblock specification does not contain such information, though it seems like there might be an extension to the original fields (something about after byte 264).In fact u... |
You are correct writing that the original ext2 superblock specification does not make provision for storing the file system creation date.
But leaves 788 bytes Unused starting from offset 236.
Unused meaning free for use by the programs creating/using the filesystem.
Ext4 contrarily makes provision for storing when th... | Unix ext2 superblock - file system creation date |
1,419,660,692,000 |
What I want to see:
$ printf "\U1F600\n"|hexdump -v -e '1/1 " %03o"'|tr ' ' '\\'
\360\237\230\200\012
What I tried:
$ printf "\U1F600\n"|hexdump -v -e '1/1 "\\%03o"'
hexdump: bad conversion character %�
$ printf "\U1F600\n"|hexdump -v -e '1/1 "\%03o"'
hexdump: bad conversion character %%
$ printf "\U1F600\n"|he... |
Based on this example in the hexdump man page:
# hex with preceding 'x'
% echo hello | hexdump -v -e '"x" 1/1 "%02X" " "' ; echo
x68 x65 x6C x6C x6F x0A
it seems you can use -e '"\\" 1/1 "%03o" '
Ex.
$ echo hello | hexdump -v -e '"\\" 1/1 "%03o" ' ; echo
\150\145\154\154\157\012
| How to include a backslash \ in the hexdump output format string? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.