I am a beginner in Linux and I am trying to do something very basic (yet it does not seem to work). I have installed a python3 package. I wish to run this Python package on a specific folder from my linux machine. The idea is that this package should restructure all my files in a specific format (this is
Tag: linux
how do I copy over a few folders from one directory into another folder in Linux using python
I’m trying to copy over a bunch of folders, read from a txt file into another folder . How do I do this? I’m using python in Linux e.g this txt file has the following folder names and I want to copy these folders and their contents to a folder called duplicate-folder How do I do this? I tried the
python program won’t handle systemd KillSignal at reboot
I have a set of LEDs that I start and turn into a specific colour when the machine starts up and during other events. At power-off/reboot I want the LEDs to reset to the default colour. To achieve this I start a systemd service that starts up the LED code and have a handle for the signal in the python
Copy file using hexdump and hexedit
I have a binary that has to be copied over serial port to the device that has hexedit installed. How to get hex dump of the binary on Linux (preferably in Python) in a format that can be simply inserted into hexedit? Answer Restating the question a little, I think you want to generate a hex dump of a binary
Extracting all JavaScript filenames from a log file using bash script
I have 4 different named log files, all with txt extensions. I need to write a bash script file that extracts JavaScript file names from any of these log files regardless of their names. The output of the script should not include the path, have to be unique, and sorted After some research I came up with this: This code
Python Socket – Sniffer does not intercept all packets
My sniffer is running on linux via virtualbox. A network bridge with promiscuous mode between linux and windows. I want to intercept windows packets while on linux. But my program does not intercept these packets. However, it can do this if I run tcpdump and the program itself at the same time. I created the socket as follows: Answer Add
itterate through multiple URLs with BS4 – and store results into a csv-format
hi there i am currently working on a little tiny sraper – and i am putting some pieces together i have an URL which holds record of so called digital hubs: see https://s3platform-legacy.jrc.ec.europa.eu/digital-innovation-hubs-tool/-/dih/1096/view i want to export the 700 regords in (to) a csv-format: that is -into a excel-spreadsheet. so far so good: i have made some first experiments –
Airflow: ‘ERR_CONNECTION_REFUSED’ on port 8080 & 8081
I installed airflow (v 2.2.4) on the ami below: The folder it currently lives in is here (But should I relocate this somewhere else per these docs?) AMI INFO: And the issue I am having is that after I run airflow initdb – which works great, I run airflow webserver and when I try to copy in the http value
How to convert Linux date string to Python Datetime
I am trying to convert the Linux date time ‘Fri Feb 25 16:07:17 UTC 2022’ to python datetime but not able to achieve the same. However, I am able to do using below code, but still looking for the right approach: Input -> Fri Feb 25 16:07:17 UTC 2022 Output -> ‘2022-02-25 16:07:17’ Answer Output 2022-02-25 16:07:17
How to connect to MediaPlayer2.Player PlaybackStatus signal using pygtk?
I actually want to display the information about the media or song currently being played with a window as a popup containing the artwork and the song name etc. I read about that a PlaybackStatus signal is emitted whenever a media is playing or stopped. How would i connect to that signal, well I read about dbus and came to