delete interview questions
Top delete frequently asked interview questions
I did something crazy at some point that created a file called -rf
on my filesystem.
Now I can't figure out how to delete it...
I've tried:
rm "-rf"
rm \-rf
These just exit immediately, arrgh!
Anyone know how to remove this file? Preferably without accidentally cleaning out my whole folder.
Source: (StackOverflow)
I am having one particular folder (/home/sam/officedocuments
) which is having hundreds of folders and files.
I think I deleted some files and folders by mistake but I'm not sure.
How to find which files / folders were:
- deleted recently in Linux?
- changed recently in Linux?
I just want to know which files and folders were deleted. Recovering those deleted files and folders is not important for me.
OS: CentOS
Source: (StackOverflow)
We are thinking to make our web application hosted on a windows server 2003 machine create temporary files, and "leave" it there as such. We won't manually take any action on them. So will these files get automatically deleted? Or is there some sort of policy we have to configure - like these files should get deleted after 30 days or so...
Update:
A production server will hardly get shutdown. What to do then if the files have to be deleted somehow?
Source: (StackOverflow)
I have a file whose size is 0 bytes. When I try to remove it an error message appears, saying "Could not find file".
Here is the list of things I've tried to delete the file:
- Rebooted
- Reset folder options
- Cleaned the registry with CCleaner
- Using the
del
command
- Replacing it with a different file
The dir
command gives this information about the file:
25.06.2011 21:06 0 STALKER
File properties:
How can I remove it?
Source: (StackOverflow)
Eclipse created a temp folder in one of the directories which is nested quite deep, e.g.
dir1\dir1\dir1\dir1\...
I am unable to delete this folder in Windows via Explorer, the del
or rmdir
commands, nor the Cygwin 'rm' command. How should I remove this very long folder?
It just keeps saying "File name too long..."
Source: (StackOverflow)
what command can I type into Terminal so that I can:
- delete all .svn folders within a folder (and from all subdirectories)
- but not delete anything else
?
Source: (StackOverflow)
I updated my laptop's OS from Windows XP to Windows 7. There are some leftover files from Windows XP on the computer now. If I try deleting them I get the following error:
You need permission to perform this action.
You require permission from S-1-.... to make changes to this folder.
What's weird is that I am logged in with the only user account on this machine and I have administrator privileges. I tried turning UAC off, but I still can't delete the files.
How can I force removal of these files?
Source: (StackOverflow)
From a Windows workstation when I delete files over the network (e.g. a file share, server disk, etc) those files are never put into a trash can, either on my Windows workstation or on the server - they're instantly and permanently deleted. This has always sucked IMHO.
Is there a software that, in this scenario, puts the files into a trash can somewhere for easy undelete?
Maybe a Windows policy change, registry setting value, software utility, etc ?
--
Looking for a specific solution instead of general "Hey look into this, or try this". I'm convinced somebody has already solved this and can explain it. Thanks.
Source: (StackOverflow)
Somehow a file named -]???????q
got created on my terminal. I tried rm -f "-]???????q" (in double quotes), but it did not get deleted. (Error:: rm: invalid option -- ]
). How do I delete it?
Source: (StackOverflow)
I've got a rather large number of files on my Windows drive that have a colon in their name. (These came from unpacking some Unix archives.)
When I try to delete them, Windows (XP) complains that the file does not exist, and refuses to delete it. This happens when trying to delete or rename it from explorer or the command line. Still, chkdsk
does not complain about those files nor fix the problem.
Any ideas on how to get rid of them?
Source: (StackOverflow)
Time Machine is nice because it Just Works and it does its magic in the background. But left to itself, it can really swell up due to either large files that you don't really need backed up slipping in and frequently-changing files you don't really need every version of.
How can I
- Remove files from backups?
- Find and exclude files that I don't want backed up (e.g. frequently changing ones)
Source: (StackOverflow)
I'm a developer and as part of the build process, a Microsoft dll is copied to a certain
folder. That file copy is now failing as the target can't be overwritten.
I decided to delete it by hand (using an admin account but a non-elevated explorer) so browsed to the folder and attempted a delete. This failed (Require permission from the Administrator). The same applies when using an elevated explorer.
So I tried Properties->Security->Advanced->Ownership
The current owner is showing as Unable to display current owner
. I can't take ownership (a simple Access Denied
message with no elaboration). Elevated Command Prompt/PowerShell don't help either (both give an Access Denied
in their own way).
Process explorer shows no open handles on the file.
Eventually, I booted to linux and deleted the file but what I'd like to know is what caused it?
Security Essentials had no issues with the file. It's digitally signed by MS and the signatures match.
Source: (StackOverflow)
I'm trying to delete a folder in Windows 7 and get a perplexing error message: "Could not find this item: This is no longer located in G:\Graphics. Verify the item's location and try again.
I can see the folder -- I can find it. I just can't delete it.
I also get a second error message (sometimes) when I click on the folder: G:\Graphics 2009-11-17 refers to a location that is unavailable...this information might have been moved to a different location.
I'm using Windows 7; this folder is on an external hard drive. I've emptied the folder (there were items in it); I've scanned that external hard drive for errors. Trying to rename the folder yields the same enigmatic error message.
Is there a way to delete this folder?
Source: (StackOverflow)
After installing Cygwin on Windows 7 and realizing I'm better of with using Linux on a different partition, I wanted to uninstall it. However, Cygwin has no uninstaller so I was left with the option of deleting the whole folder it was installed in – which I did.
The problem is that a single file remained, in the whole directory tree, named README.
at C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura\README.
I know Windows isn't supposed to allow files with names ending in .
, but this one obviously got through, and I cannot delete it. When trying to do that, I get
Item Not Found
This is no longer located in C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura
. Verify the item's location and try again.
When viewing the properties of the file (Right-click, Properties), Windows tells me that it has 0 bytes. However, when viewing it in the explorer window, and clicking on it, the windows status bar thing tells me it has 517 bytes.
Any ideas on how to get rid of it?
Source: (StackOverflow)
I use Dropbox on my Windows 7, OS X and on my mobile phone. Sometimes I see a file called .dropbox
in my dropbox folders, can those files be deleted?
Source: (StackOverflow)