General :: Del Command To Remove Files To Directory Instead Of Completely Deleting Them?

Dec 2, 2010

how to write a script so that when I use the 'del' command it removes/sends the files / folders to a I specify for example 'dustbin'

View 1 Replies


ADVERTISEMENT

Ubuntu :: Completely Deleting Files & Virtualbox OSX

Feb 27, 2010

It turns out I caught the Linux bug. I'm now completely obsessed with it. Most of the time if I can't get something to work I do a quick web search, and I find the solution to my problem in the first link or three. This is the exception. I wanted to install XP or 2000 using Virtualbox OSE just in case I needed to look up something on Windows or print something off (can't find any drivers for my Lexmark printer). I tried XP first and it gave me an error. Then I tried 2000. At this point I went to delete the program and try again. The first thing I tried was sudo apt-get remove virtualbox. Then when I re-installed it, I still had my settings and partitions on there. I then went to the add/remove programs. Same thing after the third install. I then went to the Synaptic Package Manager and clicked completely delete files (or however it was worded). After the install it still did the same thing as the previous times. When I try and load Virtualbox it says "FATAL: No bootable medium found! System halted.". Also sometimes my pointer will get locked inside Windows. How do I get out of that? The only thing I was able to find was hit CTRL + ALT + Back and it exits both Windows and Linux.

View 8 Replies View Related

General :: Deleting All Files From Directory Except For Two

Nov 25, 2010

I'm writing a Perl script which performs linux commands.I have a directory with a load of files.

Code:exec_cmd('rm $(ls * | grep -v file1)');
This command will delete all except for file1. How can I modify this to delete all files except for file1 & file2?

View 2 Replies View Related

General :: How To Delete All Files In Directory Without Deleting?

Feb 9, 2010

I know that rm -i will prompt wether you want to delete each file.But rm -i -r will prompt for each file in each subdirectory recursively. How to make it prompt just for the directory itself, and then delete its contents without asking?How to delete all the files in a directory without deleting . and ..?How to recursively delete all tilde files in a directory?How to GUI file managers delete files to Trash? Where is this "Trash" located? Can you delete to trash in the command line?

View 14 Replies View Related

General :: Manually Remove .vdi Files Left Over After Deleting VirtualBox?

Oct 24, 2010

I have a question, that may sound silly. I have removed VirtualBox from my Ubuntu install. But the .VirtualBox folder is still existing with a virtual drive of nearly 10 GB. Can I manually remove the folder .VirtualBox with rm -rf without any unwanted side effects?

View 2 Replies View Related

General :: Rsync Deleting Files From Destination Directory?

Jul 14, 2011

We have an rsync cron job set up to mirror all the files in a "..dashtdocsdocs" folder to the same folder on another server. It copies all the files over correctly and deletes any files in the "docs" directory that aren't in the sending directory, but it also deletes any files we put in the target directory's parent folder (..dashtdocs or other subfolders like ..dashtdocsimages) even though they've been excluded in the .rsync-filter file.

Here's our current rsync .sh:

/usr/local/bin/rsync --stats -qPzrtpl --delete --password-file=/var/run/.appprodrsync --log-file=/export/home
/webuser/logs/rsync-extranet-log -FF /export/home/ appprodrsync@appprod::dprweb_extranet/ > /export/home/webuser/logs/rsync-extranet-output 2>&1

[code]....

So for example server A has ..dashtdocsdocs and ..dashtdocsimages. Server B has ..dashtdocsdocs but if I manually copy the images folder over to ..dashtdocsimages, the images folder gets deleted from the target directory every time rsync runs.

A: ..dashtdocsdocs
..dashtdocsimages
B: ..dashtdocsdocs
..dashtdocsimages (<-- gets deleted everytime rsync runs)

I'd like to keep just the docs directory synched and update other folders manually, but they keep getting deleted. It looks to me like it's running a delete-excluded option, but that option wasn't used.

View 2 Replies View Related

Programming :: Deleted Files In Directory With So Many Files Without Deleting Directory Itself

Nov 14, 2010

There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.

View 3 Replies View Related

General :: Find Directory Older Than X And Mv Directory With Sub Files Command?

Jul 13, 2011

I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively

View 4 Replies View Related

Ubuntu :: How To Completely Remove Tomboy And All Its Associated Files

Dec 16, 2010

I used synaptic package manager to remove tomboy notes and marked it for complete removal. But when I typed "locate tomboy" in the terminal window there were over 50 folders or files listed. Is there a single command I can use to remove all these or do they have to be deleted one by one.

View 4 Replies View Related

General :: Cron To Remove All Files Within Directory Except One File?

Jun 28, 2010

I would like to create a cronjob that will delete all files within a directory 1 hours after it is created to the folderI found this cron find /path/to/file/* -ctime +1 -exec rm {} ; but it's deleted all files.I want to make an exception, all file should be deleted except one file (letsay file a.zip)

View 16 Replies View Related

General :: Recursively Remove Subdirectories And Files But Not The First Parent Directory?

Feb 11, 2010

I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf

However, I do not want the target directory to be removed. How can I remove just the files in the target, the subdirectories, and their contents?

View 4 Replies View Related

General :: Tar Command For Directory With Files

Feb 24, 2011

Using tar command. All I need the usage, and basic explanation. Let's assume I have a directory with files that I need to tar, how do I go about it.

View 14 Replies View Related

Ubuntu :: Remove Files From Directory A If Their Name Appears In Directory B?

Jul 7, 2010

I have two questions:How do I remove files from Directory A if their name appears in Directory B?How do I move foo.jpg and bar.jpg from Directory C to Directory D if and only if foo.png and bar.png appear in Directory D?I suspect there's probably a bash one-liner for this, but...I can't come up with it.

View 5 Replies View Related

General :: Apply A Command To All Pdf Files In A Directory?

Jul 29, 2011

i want to apply this command

Code:

pdftotext article.pdf - | grep DOI

to all the pdf's in a directory and save each line of output to a text file. i.e. i want to collect each line containing "DOI" from every pdf in a text file. I am unable to understand bash scripting enough to write a for loop for this.

View 1 Replies View Related

General :: Rm Non-interactive Command - Delete A Directory With Its Files

Sep 28, 2010

I wanna delete a directory with its files and I wanna do that as follows: rm -r dirToDelete Unfortunately, I always get asked for EACH single file if I wanna delete this because it is write protected.... Is there a way to suppress this feedback message so that just the whole directory with its contents disappears?

View 5 Replies View Related

General :: Ls Command And Displaying Number Of Files In Current Directory?

Oct 15, 2010

What command will provide you with the number of files in your current directory?
Choose one answer.
A. ls -c
B. ls | wc -w (this one)
C. ls -n | count
D. ls -wc (this one ?)

View 5 Replies View Related

General :: Preventing Deleting Of Directory?

Jun 14, 2011

i need to restrict access of deleting to directory and partitions os disk? how do i do it?

View 5 Replies View Related

General :: Remove A Service Completely?

May 17, 2010

I want to completely remove a service i.e ypserv from my red hat linux service list.that how can i completely remove a particular service from the service list

View 5 Replies View Related

General :: Useradd Command To Create Passwd / Shadow & Other Files Under Different Directory

May 19, 2011

I am bulding my own image based on 2.6.32 kernel, I wish to add a guest user:

In a script thats invoked by the makefile, I use 'useradd' command & this updates the shadow, passwd files under /etc on the host, is it possible to tell the command to create the shadow / password under some other folder on the host? may be /tmp?

View 2 Replies View Related

Fedora :: Completely Hide Gnome Panels Without Deleting Them

Feb 25, 2011

I am trying to completely hide the gnome panels on my desktop. When using auto-hide there is still a visible line of about 1 pixel, and the panels are still there anyways. I have gone into gconf-editor and changed the autohide size to 0 and it still doesn't completely hide it or make them so when i hover near them they don't appear. I am also not looking to completely delete the panels either. I went into gconf again and blanked out the required_components field, (didn't turn out the way i expected, lol), and had to start gnome-panel manually afterwards and lost a lot of functionality in the OS.

I found this tutorial last year for sending gnome-panel to the widget layer for Ubuntu, but cannot get it to work in Fedora.This works perfectly in Ubuntu (once you log-out), but it doesn't work in Fedora. Does anyone have any suggestions on how i can this exact same thing to work in Fedora. It seems like it tries to work, but maybe my syntax is wrong or something.

View 3 Replies View Related

General :: Automatically Deleting The Directory In RedHat 5?

Feb 21, 2010

Something strange is happening with RedHat Linux 5. I created one directory system_verilog twice and both the times somehow it's get deleted after next booting of machine (after modification of some of the file in this directory).

View 3 Replies View Related

General :: Command Line - Automating A Task - Copy All Subdirectories And Files From One Directory To Another

Jun 10, 2010

I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.

View 2 Replies View Related

General :: How To Remove Lynx Browser Completely

Apr 19, 2010

how to completely remove the LYNX browser?I am currently using openSUSE 11.2 .

View 12 Replies View Related

General :: Uninstalling / Remove Win7 Completely?

Jun 6, 2010

I have a dual boot laptop Fedora and Win7, I want to remove win7 completely, so I can use the full hard drive for linux. How would I do this, so it boots linux only.

View 13 Replies View Related

General :: Deleting A Directory In Emacs' Dired Mode

Feb 16, 2011

I would like to delete a directory in emacs' dired-mode.

I mark the directory with the "d" key, and then hit "x" to deleted flagged.

I then get the following error:

Is there any way to get emacs to delete the directory and stop its whining?

View 1 Replies View Related

General :: Remove PHP-5.3 Completely From My Machine After Make It From Source?

Oct 15, 2010

I want to remove PHP-5.3. completely from my machine after make it from source.
how can this be done?
When I try make uninstall I get:

make: * No rule to make target `uninstall'. Stop.

View 1 Replies View Related

Ubuntu :: Remove All Files From Directory Except Some?

Jan 31, 2010

I am still a novice with Ubuntu and I am trying to write a shell script which will clean redundant files. I am stuck with one line where I would need a command which will remove all files from directory except some of them. Can anyone please advice how to add such an exception to the rm command? I have searched some bash shell tutorials, however, no joy. Guess I have overlooked something.

View 9 Replies View Related

Programming :: Remove All Files From A Directory Which Are 24 Hr Old?

Apr 8, 2010

I was preparing a script which will remove all my files from directory which are 24 hour old.I tried some thing like thisfind . ( -name 'log.*' -mtime +1 ) -exec rm {}; but it is throughing error like : missing argument to exec.

View 8 Replies View Related

Security :: Using Sed To Remove A Line From All Files In Directory

Jan 23, 2010

A Javascript has crept into all my hmtl, php files in my shared hosting account. I have SSH access.How can I use sed to remove that line from all files in a directory recursively ?sed doesnt change the original file.And I need to specify *.php and *.html

View 4 Replies View Related

General :: Deleting Iframes From Files

Apr 25, 2009

my website was recently infected with this stupid malware lotultimatebet .cn...there is a hidden iframe on almost all the 6000 pages of my site.can you please advise, if it is possible for me to remove this line from all pages by executing some command?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved