rm Questions
3
Solved
This question states:
It is amazing how many users don't know about the rm ./-rf or rm -- -rf tricks.
I am afraid to try these, but curious as to what they do. They are also very difficult to ...
Triboluminescence asked 17/12, 2013 at 17:8
3
I have a piece of JAVA code which reads a few files and keeps them loaded into memory for sometime. The file handles are preserved after reading. My problem here is that I want to restrict user fro...
3
Solved
I'm sure this is straight forward and answered somewhere, but I didn't manage to find what I was looking for. Basically, I'm trying to run a cron script to clear the contents of a given directory e...
Ash asked 5/5, 2011 at 10:28
3
Solved
Possible Duplicate:
Unable to remove a special named files in terminal
I feel silly asking, but how can I delete a file in linux named --preserve-permissions?
I tried:
rm "--preserv...
3
Solved
I have a script that creates files, and sometimes they end up having two dashes at the beginning. Is there any way to delete them? mv doesn't work either.
Here is the error I am getting:
$ ...
4
Solved
I want to remove all files from Git at ~/bin/.
I run
git rm -r --cached ~/.vim/* # Thanks to Pate in finding --cached!
I get
fatal: pathspec '.vim/colors' did not match any files
This error ...
1
Solved
I'm using Python and Envoy. I need to delete all files in a directory. Apart from some files, the directory is empty. In a terminal this would be:
rm /tmp/my_silly_directory/*
Common sense dicta...
Renewal asked 30/7, 2012 at 13:12
2
Solved
3
Solved
I'm trying to build a function that will remove all the files that start with 'prepend' from the root of my project. Here's what I have so far
def cleanup(prepend):
prepend = str(prepend)
PROJEC...
3
Solved
3
Solved
My project has a file foo that I've been using and checking in with git. I just did some refactoring so that I no longer need the file at all. If I do git rm foo, will the file still exist in older...
1
Solved
I have my code as follows -
#!/usr/bin/env python
import time, glob, os, sys
from datetime import date, timedelta
try:
dpath = sys.argv[1]+"/"
except:
print "usage: " + sys.argv[0] +" <dir_...
5
Solved
How to remove more than one directory using single command? Is it possible to do it in one liner? If yes, Please help on this.
/osmf/mgmt/scheduler>ls -lrt
total 22
drwx------ 2 root root...
3
Solved
I am using Linux and intend to remove some files using shell.
I have some files in my folder, some filenames contain the word "good", others don't.
For example:
ssgood.wmv
ssbad.wmv
goodboy.wmv
c...
3
Solved
I went to check how to remove a directory in Python, and was led to use shutil.rmtree(). It's speed surprised me, as compared to what I'd expect from a rm --recursive. Are there faster alternatives...
3
Solved
2
Solved
Some program makes ta my root directory dummy files such as
-1
-2
-3
...
-n
I run unsuccessfully
rm -1
and too
rm "-1"
Terminal thinks that -1 is the option.
How can you remove the files ...
Libel asked 26/4, 2009 at 16:39
1
Solved
I get a long list of read-only protected files when I run
rm -r trunk | yes
I am trying to answer yes to all by one command.
How can you answer yes to all questions?
Hexone asked 25/4, 2009 at 22:15
3
Solved
Possible Duplicate:
Restore a deleted file in a Git repo
I have two branches in my Git, master and newFeature.
At the branch newFeature, I removed the fileA physically first in termin...
5
Solved
I noticed today (after ~8 years of happily hacking away at bash) that there is no trivial way to 'delete by date' using ´rm'. The solution is therefore to pipe stuff around a combination of command...
© 2022 - 2024 — McMap. All rights reserved.