Ubuntu :: Write A Shell Script To Extract Files From An SD Memory Card In The Background?
Aug 20, 2010
I'm looking for a way to insert an SD memory card into my computer and have it copy the files from it (a specific directory) in the background while I view the images from the desktop.
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
I am new to linux at driver level. I want to read/write at specified memory location in microSD card in linux. I do not want to used SD card with any file system. How to do that. My linux distribution is Fedora13.
Few weeks ago modified my old mobile phone SE k750i by setting on it w800i firmware. After this my phone isn't really (fully automatically) recognized by Ubuntu (9.10) which is the small problem for me now. Linux recognizes it as a USB device, but doesn't automatically mount it, which is why I have to do that manually and that leads to read only permissions for my user.
Here are the few outputs:
lsusb Code: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 006: ID 046d:c222 Logitech, Inc. G15 Keyboard / LCD Bus 002 Device 005: ID 046d:c221 Logitech, Inc. G15 Keyboard / Keyboard Bus 002 Device 004: ID 0fce:d028 Sony Ericsson Mobile Communications AB Bus 002 Device 003: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse Bus 002 Device 002: ID 046d:c223 Logitech, Inc. G15 Keyboard / USB Hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub dmesg | grep usb .....
I've tried to create a custom udev rule via this thread, by putting the correct information according to lsusb:
Code: SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d028", MODE="0660", OWNER="zivs" and reloading the udev rules, but that didn't help also.
How could I make my Ubuntu mount the /dev/sdb1 (which is my phone's memory card, since manually mounting it, there's all my phone recorded stuff) automatically on Desktop with all read and write permissions when I connect my phone to computer? Phone gets recognized immediately on Win7 OS ... but after the firmware change it's not really recognized by Ubuntu anymore.
Can you please do me favor and let me know how can I write the *.iso image files onto USB memory sticks as if we burn them into CD and thus making bootable CD to boot from ? Is there any command under Linux for this purpose ?
i have to write a shell script that will delete all the .dat files in /var/oracle/etl/incoming which the created date of the file is 7 days before the currrent date.
I need to process billions of small files using bash shell commands with limited memory size (256MB). If any of those files contain certain "keywords", the file will be removed. I tried with command:
I have spent the most part of 5 hours trying to fix this issue. For some reason I cannot change the background image to any of mt .jpg wallpaper files (and .png files). I've tried using the Ubuntu-Tweak application, but I end up getting a purple screen (default) or a black screen (default). So then I tried using the terminal method by making the Appearance window appear when I would log out. That works, except when I go to use my background image, it shows as a question mark for the image preview, and the icon for the file is a gray box. All while doing this my background images that I tested are all in the /usr/share/backgrounds location. Please help! I really want to get rid of the default images and use my images... :/ My desktop/screen in 1440x900, and most my background images are around that size. They work with my regular desktop for my account.
I need to write shell script which can take number of files and count total rows from all CSVs and display total number of rows counted in all files. Is there any possibility of doing that using shell script and if yes then how.
I need to write a shell script which can ready content of the folder and place files on remote FTP server. I need to make sure that a file that is already placed on remote FTP server is not attempted second time. The file names will be something like Records-2011-05-09. The files will be generated by MySQL every hour.
when I delete a running executable or script, it usually (for me, pretty much always, but I don't know if it will work in every case) continues to run without any problems. So I've got two questions here: Where is the running executable/script being run from? RAM memory? If stored in RAM or where ever, is there a way to extract the executable/script from that location? If it makes any difference, I'm using Ubuntu 11.04.
I want to write a script that will extract information from a db table and store that information to a csv file. Basically, I have imported data into a table, I want to save this data to a csv file for later processing. How do I connect to the db and extraxt information from the table?
I am doing a program that reads data from a gps and some other devices and writes some files with all the information. When I run it normally it works fine, but if I run the program in the background (with the ampersand) files are not created until I bring it to foreground or close it. I am confused, the program should run the same way with and without the ampersand. (Could it be that the main process that creates all the threads does not create them when it is executed in background? It seems like if the program is stopped until I take it to the foreground).
I have to admit that I register to LQ after I failed to search for similar solutions.let me see whether I can explain my problem clearly. I need to extract a single report from a big file. The big file looks something like this:
Report for yyyyyy Your info 999-9999999 End of Report
[code]....
I need to search for a user provided string, say 999-9999999, in the big file. Then I have to extract the single report. My logic is simple,
1) find 999-9999999 2) backward search for "Report for", note down the line number 3) forward search for "End of Report", note down the line number 4) extract the record by using info found from step 2) and 3).
I am trying to do this in bash, with awk and sed (I am new to both).
How to write a value to a specific memory location in C language and how to access the same value ? I am trying the same on fedora linux and i am trying to write the value to the 32-bit address.
I have encountered this problem of memory usage is increasing as the during the my program is being run until 1Mb is left then it stays at that.A part of the program is this:
I used to be able to write to my SD memory card but just recently it is being automatically mounted as read-only. I checked the read-only tab and tried to set it to the lock position, and to the unlock position. Neither position makes a difference. It was working normally a few days ago. I also tried changing the permission using su
ls -lt gives the following result drwxr-xr-x 4 col root 16384 1970-01-01 01:00 CANON_DC chmod chgrp and chown in su mode don't change anything either.
I tried mounting a different 1GB SD card and it works perfectly. I noticed that when I mount this card I get a window asking me what I want to do, but I don't get this on the other card. It must some kind of setting related to the unwriteable card.
I'm sniffing network packets in ubuntu, I need to write these packets as raw bytes to memory but libpcap give packets in its special format. how can i save and recover packets in byte format?
Im just trying to write some script to caputre memory and cpu usage on SLES servers, I just wanna use "top |grep Mem" and "top |grep Cpu". when I ran the above command, it just keep going. i just want to get one line each for memory and cpu.