|
I want to make sure that I delete required files. I have code something like
dir="/some/path/" file = "somefile.txt" cmd_rm= "rm -rf "+dir + file os.system(cmd_rm)
The dir and file values are fetched from a database. How can I make sure I never end up...
Started by lakshmipathi on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
However it is implemented in python so if you are deleting a huge number of files then spawning rm may(dir, file) shutil.rmtree(cmd_rm)
If you want to delete the directory use:
dir="/some/path/" file.
|
|
I run unsuccessfully in my .zshrc
unalias rm rm() { mv $* /tmp/wastebasket }
I get at the startup
/Users/Masi/.zshrc:unalias:34: no such hash table element: rm
I noticed that the hash table problem has been an unresolved bug in Ubuntu for run-help. I ...
Started by Masi on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Since you can alias something more than once without an error, I would change your code to be:
alias rm=x unalias rm rm() { mv $* /tmp/wastebasket....
That error message is because you're trying to unalias rm and there is no such alias.
|
|
Post Last Edit by shamiju at 8-2-2012 01:20
Diperbuat dari cotton. Free saiz, muat sampai saiz XL. Inner not include.
Berminat? Hubungi 012-2240438 (Juliana) atau layari http://dirami-collectionz.blogspot.com/
Started by Send PM on
, 25 posts
by 1 people.
Answer Snippets (Read the full thread at cari):
Post Last Edit by shamiju at 8-2-2012 01:17
BLOUSE WAKA-WAKA : RM 50 SEM/RM 55 SS INCLUDE POS.
|
Ask your Facebook Friends
|
Is unlink any faster than rm?
Started by Marcin on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
You could demonstrate the difference with:
$ touch $(seq 1 100) $ unlink $(seq 1 100)... .
Sanity checking when compared with giving rm(1) multiple arguments.
More feedback.
rm(1) :
More options.
The differences between the userland utilies.
|
|
Hello
I know how to play .flv video files in flash. And can I play .rm video file?
For example this: http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/11/11.309/s06/lecturenotes/ocw-11.309j-06mar2006-56k.rm
best Vladimir
Started by Vladimir on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
These codecs are supported: List of codecs supported by Adobe Flash Player .
You cannot.
I do not think you can play realmedia files in Flash .
|
|
The name of the file is "\033[A.tex". Note that the filename includes two times the character ".
I run unsuccessfully
git rm ""\033[A.tex""
and
git rm "\033[A.tex"
How can you remove the file from Git?
[edit]
The filename is more challenging.
Situation...
Started by Masi on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Does any of the following work?
git rm "\\033[A.tex" git rm "\*A.tex" (assuming this pattern....
Or try typing ./\033 then pressing tab to autocomplete in some shells .
Try:
git rm "./\033[A.tex"
That will look in your current directory.
|
|
Hi,
What will this command do on unix:
rm somefile ~/data
I was trying to move somefile to the folder at home/data
Answer Snippets (Read the full thread at superuser):
Bash/Ubuntu:
meder@meder-desktop:~$ rm lol ~/lmfao rm: cannot remove `/home/meder/lmfao': Is a directory
As ....
You need 'mv'
Use 'man rm' and 'man mv' for more information.
rm means 'remove'.
You removed somefile completely.
|
|
Is it possible to use rm to remove files and directories matching a pattern recursively without using other commands?
Answer Snippets (Read the full thread at superuser):
| grep <pattern> | xargs rm to the last character....
You can , however for everything in this tree, search for the file pattern, pipe to rm find .
To directly answer your question, "no - you can't do what you describe with rm ".
|
|
What is the easiest way to do the equivalent of rm -rf in python?
Started by Josh Gibson on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Import shutil shutil.rmtree("dir-you-want-to-remove")
shutil.rmtree() is right answer, but just look at another useful function - os.walk() .
|
|
I am trying to use the rm command in the main routine for deleting a file that i have taken a command line argument...the value is stored in argv[2] i have tried using system("rm argv[2]");
system("rm ./argv[2]"); system("rm $HOME/argv[2]"); but it gives...
Answer Snippets (Read the full thread at stackoverflow):
You]; buf[255] = '\0'; if (snprintf(buf, 255,....
The "argv[2]" in "rm ./argv[2]" is a literal string, if you want to use what is stored in argv[2], you need to use strcpy() or sprintf() to connect "rm ./" with the string stored in argv[2].
|