Debian :: Automatically Delete USB Flash And Copy New File
Aug 26, 2010
How can I automate the following: When I insert a flash drive into any of the available USB ports, some kind of script or software, must automatically mount it, delete everything off the flash drive, copy an audio file back to it and then automatically unmount the USB.Maybe I should setup some kind of Kiosk to use the above functionality - would that be easy?
View 2 Replies
ADVERTISEMENT
Jan 5, 2010
I've just started using ubuntu one. However, some of the files I store on there are sensitive so I encrypt them using seahorse. Right click, encrypt etc etc. My question is, is there a way to automatically get the encrypt process to delete the un-encrypted file when it makes the new encrypted copy?
View 6 Replies
View Related
Jul 20, 2010
I have a file that contains 100 ligns, i need to write a script that read 70 lignes and redirect those 70 ligns to another files and these 70ligns have to be erased in the first file
when i write this command
head -70 somefile.txt>test.txt
or
sed -n 70p somefile.txt>test.txt
i have these 70 lines in the text.txt files
but these 70 lines have to be deleted inthe first file somefile.txt
View 1 Replies
View Related
Apr 24, 2009
When using mput in smbclient (with recurse turned on) is there a way to automatically respond yes to the prompt to copy each file, or avoid the question all together?
View 2 Replies
View Related
Jun 2, 2011
how can I either copy a file (say, ~/file.txt) directly to the flash drive? I know that I can use the command
Code:
sudo cp ~/file.txt ???
to copy it, but what goes in the question marks?
View 1 Replies
View Related
Jul 13, 2011
I am pretty much a noob when it comes to Linux. But I desperately need to do exactly what the title of this thread says.I have this ISO file which is a bootable CD image. But instead of booting off of a CD, I want to boot from a USB flash drive. I understand that I can't simply just burn it with ImgBurn or whatever, and then just drag and drop the files and folder to a USB flash drive. Because hidden files, bootloader, etc. would not be visible and not copied. I know I'm in for some special software in order to copy every single byte from that ISO image to my USB flash drive.
I did try extracting the ISO with PeaZip (7-zip based) under Windows Vista, but that didn't work out very well. It resulted in a few files and folders, totaling in at about 2 KB, while the source ISO file is actually some 50 MB. WinRAR, on the other hand, would simply just create an empty folder where to put the files (no files created/extracted), flash before my eyes and call it a day ("complete").I have learned from other posters on other forums that there is this Unilx program/command called DD. How can I use DD to accomplish this task?
View 2 Replies
View Related
Aug 31, 2015
My dad don't like that windows is no longer on the laptop, but I can't install linux on it cause they want windows back... in the meantime we're using Debian 8.1 with KDE but is live and doesn't have flash player which my dad uses to listen dossiers from Walter Martinez and hates that he can't do that now without me doing the installing every single time and sometimes I'm not there so he can't watch his favorite shows. Is there a way he can just double click something so is automatically installed?
View 7 Replies
View Related
Jul 31, 2011
I am new to opensuse 11.4. I am trying to copy the flash 11 beta file (libflashplayer.so) into the lib64/browser-plugins folder but i get 'Access Denied. Could not write to (destination).
View 4 Replies
View Related
Aug 17, 2015
There is this bug in the latest version of Ubuntu, which is also Jessie, which is:
Can't copy a file from SMB share to the local file system: Software caused connection abort
The problem, apparently, is that newer versions of Samba hit servers with multiple requests at the same time, and for some reason the Zyxel and Iomega boxes can't handle this. The best solution they've come up with is to modify the smb.conf file on your server to include this setting: "max mux = 1".
Here is the reference material on this bug: [URL] ....
People who develop samba have fixed it in the latest version but neither the ubuntu nor Debian have released the fixed version of nautilus, as of yet. Here, is the reference: [URL] ....
View 0 Replies
View Related
May 20, 2010
I would like to delete some files stored in the personal directory, say .adobe, .macromedia, .xsession-errors, on every start-up or shutting down. I can do it with cron but I would like to learn different (simpler) options. The thing is, I haven't been able to input the proper terms in a search engine. Note that these files must exist in their default location during the session. This is, I don't want to make them links to /dev/null or move them to /tmp.
View 8 Replies
View Related
Sep 3, 2010
I have a USB flash drive, which is bootable and I would like to copy the whole drive to a different drive.Can I just do a low level dd copy between both USB memory drives, or do I need to make an ISO of the source, and then put that ISO on the destination? I figured I could ask in less time than trying, and exhaustively testing to make sure I had it right...
View 2 Replies
View Related
Mar 28, 2011
Is it possible to use the cp command to copy a file from computer A to computer B?
Also, assuming that it is possible, does Linux SSH add extra (=its own) encryption via the file transfer or is it solely reliant upon my WIFI's encryption?
View 7 Replies
View Related
May 12, 2011
I can't copy downloaded file to /opt
View 3 Replies
View Related
Apr 7, 2010
I'm having difficulties mounting an FTP address to my file system automatically during boot. After a bit of research I have discovered a package called curlftpfs, I've installed this package using aptitude and I had no errors.
I've successfully mounted an FTP address manually using curlftpfs at the command line and proved to myself that this is working as it should...However, I can't get this to mount automatically and I am receiving the following error during boot when I try and mount it through /etc/fstab...
Error connecting to ftp: Failed to connect to (IP address of server): Network is unreachable
My research indicates this package should be able to do this.
I'm still a learner when it comes to Linux, but could this be because TCP/IP services are not started at the time of mounting the filesystems? I've tried a continuous ping at this computer whilst it is booting and I don't get a response until after /etc/fstab has been processed. If this is the reason, can I start them these processes earlier?
Another option would be to have a script/command run when the computer boots, but prior to MySQL loading. If this is possible, it would also satisfy my problems.
View 4 Replies
View Related
Apr 9, 2011
I have a script running as a cronjobIt outputs logs upon each run to /var/log/mylog.logIs there anyway I can delete this or compress it when it gets too large?A cheap and dirty way is to setup another cronjob to delete the log every X interval.... although I'm not sure if that's the proper way
View 3 Replies
View Related
Feb 18, 2010
Why is there no Delete when I right click like there is with Windows in ubuntu? Pretty much everything else is there like new folder and so on Is there some way to add it? Also why when i delete something does it not ask me if I am sure that i want to delete that file?
View 6 Replies
View Related
Mar 16, 2014
Is there any way to use sed to replace certain text in a file with the persons username automatically? Right now i'm using
Code: Select allsed -i.bak s/STRING_TO_REPLACE/STRING_TO_REPLACE_IT/g file.foo
I would like it to automatically inject the persons usrname in the replacement string. Is this possible? I've been looking on line at various sed tutorials and I cant quite find what i'm looking for. I also didn't really see anything in the forums search function.Essentially i'm trying to take this file URL...Android.rules and replace all instances of username with the persons actual username automatically.
Code: Select allsed -i.bak s/username/$USER/g 51_Android.rules
View 0 Replies
View Related
Oct 23, 2010
I'm using squid as a proxy in our organization. My problem is whenever the squid cache folder size exceeds 3 GB our proxy server starts to hang. Is there a way to write a script that it will automatically delete the squid cash when it exceeds the 3GB limit.
View 7 Replies
View Related
Jan 5, 2015
My printer has stopped working.
1. I am unsure if any system changes have occured. I am sure I must have changed something, but apparently did not document it.
2. Printer does work from other computers
3 Computer was originally wireless connected, but switched to USB. This had no affect. Well I can scan now so great.
4, Printer is HP 6500a.
5. Printer has worked from this computer before
6 This is from cups error log:
D [05/Jan/2015:11:47:48 -0500] [Job 147] Set job-printer-state-message to "Can't copy stdin to temporary file", current level=ERROR
D [05/Jan/2015:11:47:48 -0500] [Job 147] prnt/hpcups/HPCupsFilter.cpp 536: cupsRasterOpen failed, fd = 0
View 7 Replies
View Related
May 1, 2010
I have a PHP script running on my website that can generate temporary images, but if I clean them up right away, then the browser doesn't have time to render them.Is there some way to make Apache2 delete them after 5 minutes or so?
View 3 Replies
View Related
Aug 4, 2010
Is there a way to automatically remove the old linux image when a new one is updated?
When my system boots up it shows option
Ubuntu kernel version x.x.x-21
Ubuntu kernel version x.x.x-22
Ubuntu kernel version x.x.x-23
Ubuntu kernel version x.x.x-24
memtest
memtest + console
Windows 7 loader
Ubuntu seems to boot up the exact same regardless if I choose version 21 or 24. Dont recall the exact kernel since I am not in front of my computer now.
View 2 Replies
View Related
Aug 14, 2010
I have a PHP script running on my website that can generate temporary images, but if I clean them up right away, then the browser doesn't have time to render them. Is there some way to make Apache2 delete them after 5 minutes or so?
View 1 Replies
View Related
Jan 27, 2010
It seems to me that the /tmp folder is currently crowded with old stuff. How can I tell CentOS to always automatically delete all /tmp folder content just before shutdown?
View 4 Replies
View Related
Mar 16, 2010
I just installed Fedora11 with the KDE desktop and completed a yum update. Every time i try to copy and paste files and even delete files from a file manager or my desktop, I get this error:Quote:Could not start process Unable to create io-slave:klauncher said: Error loading 'kio_trash'.or thisQuote:Could not start process Unable to create io-slave:klauncher said: Error loading 'kio_file'.orQuote:Could not start process Unable to create io-slave:klauncher said: Error loading 'kio_desktop'.Current KDE version is 4.2.2
View 2 Replies
View Related
Mar 1, 2011
How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).
More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.
View 1 Replies
View Related
Jan 22, 2010
I'm having a problem with 2 of my MP3 players being readonly, so I can't put songs on and delete song. I'm having the same problem in windoze too.
View 6 Replies
View Related
Nov 24, 2010
i'm confronting atm. I need to create a folder where ppl can copy files and i need to be sure that those files cannot be deleted after they are copied there. The folder will be accessed over network, and i need to be sure no one will delete somebody else's files.Also i need to tell you that i'm working with regular users, so creating a folder for each user and chown/chmod-ing it won't do the trick(allready tried and ended up with a whole lot of files in the parent directory).I also tried chattr +a but that doesn't allow them to write new files in the folder.
View 2 Replies
View Related
Mar 27, 2010
I have server running ubuntu. There is folder /var/netflow and I have there files, which creates every 5minutes new ones(monitoring traffic on network). And I need to delete files older than 6 months manually. Can you help?
View 2 Replies
View Related
Feb 15, 2011
I am administrating a lab in a university and every semester we need to delete all the home folders of the accounts for the next semester. I would like to make a bash script that does this automatically and having trouble with it. Note that I am writing my very first bash script. What I need to do is make a script to delete the following:
Delete everything in /home/$exp$num/$dir
when "exp" could be either "rt", "ic" or "sp".
"num" could run from 1(single digit) to 45 and dir is "profile" and "work".
This is what I tried to write:
Code:
#!/bin/sh
cd /home
for exp in "rt ic sp"
do
[code]....
What seems to be the problem is the reading of "$exp$num" as a joint expression.
View 4 Replies
View Related
Mar 18, 2010
I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is
Code:
/home/pkd/fol1/
The virus would have created an file with complete paths
Quote:
/home/pkd/fol1.exe
If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path
Quote:
/home/pkd/fol11/fol11.exe
/home/pkd/fol12/fol12.exe
View 1 Replies
View Related