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...
Sonority asked 5/2, 2013 at 14:16

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...
Cochise asked 27/12, 2012 at 10:10

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: $ ...
Stob asked 17/12, 2012 at 16:9

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 ...
Luxuriant asked 28/6, 2009 at 2:3

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

In linux shell, When I run ls -al -t that show the time of files. How to cp/rm files by time? just like copy all the files that created today or yesterday. Thanks a lot.
Protrusile asked 27/7, 2012 at 9:17

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...
Rata asked 14/6, 2012 at 2:9

3

Solved

I am very new to the unix. I ran the following command. ls -l | xargs rm -rf bark.* and above command removed every directory in the folder. Can any one explained me why ?
Lindeberg asked 10/5, 2012 at 23:35

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...
Pettaway asked 24/3, 2012 at 2:17

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_...
Lowdown asked 4/3, 2012 at 15:39

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...
Parrett asked 28/12, 2011 at 11:27

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...
Holloweyed asked 3/7, 2011 at 9:48

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...
Indianapolis asked 29/3, 2011 at 10:14

3

Solved

Last night I had a script go a bit crazy and create a bunch of directories between 3:00 and 3:09am. Is there a quick one liner that will hunt these down and remove them for me?
Wheels asked 1/4, 2010 at 12:46

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 ...
rm
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?
rm
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...
Ileus asked 11/3, 2009 at 16:32

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...
Grange asked 12/1, 2009 at 9:1

© 2022 - 2024 — McMap. All rights reserved.