Sponsored Content
Full Discussion: Dangerous rm -rf command
The Lounge War Stories Dangerous rm -rf command Post 302937753 by wisecracker on Monday 9th of March 2015 04:19:47 AM
Old 03-09-2015
Quote:
Originally Posted by bakunin
Here is (part of) one of the scripts passed from a project to us. Gladly we found out readily. Names, places and details of the script have been changed to protect the guilty.....:

Code:
var="/some/place"
rm -rf "${vra}/"*

Do not try this at home!

bakunin
OUCH!

Took me a couple of seconds to see the typo...
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

List of dangerous Unix command

Hi Guys, I wonder if one of you would have a list of dangerous commands on unix. Regards (8 Replies)
Discussion started by: JBB873
8 Replies

2. SuSE

inconsistent ls command display at the command prompt & running as a cron job

Sir, I using the following commands in a file (part of a bigger script): #!/bin/bash cd /opt/oracle/bin ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out If I run this from the command prompt the result is: 2007-05-16 if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies

3. HP-UX

Upgrade serviceguard can be "dangerous"?

Hi everybody! We have to upgrade serviceguard 11.14 to 11.16, so I get PHSS_36898 patch from HP. Is it necessary to uninstall serviceguard 11.14 before install this patch? (I think so, but i am not sure). Do you know if is "dangerous" this kind of upgrade? Any suggestions about? Thx in... (1 Reply)
Discussion started by: kaugrs
1 Replies

4. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

5. AIX

AIX:Command to get netaddress/subnet address command in IPv4/IP6

AIX:Command to get netaddress/subnet address command in IPv4/IP6 Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine. net/subnet address is in the format 172.16.212.0(signifies all 255 machines in an IPv4 network) (2 Replies)
Discussion started by: rookie8278
2 Replies

6. Linux

Is umount -l dangerous?

I had a umount busy issue, that the usual fuser -mk did not solve, I did a umount -l and was able to unmount the device, I then got in trouble by the storage team staff: Here was a snippet of their response: Using "umount -l" is a potentially dangerous act. The command combination for a lazy... (8 Replies)
Discussion started by: pastajet
8 Replies

7. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

8. Shell Programming and Scripting

List of dangerous shell commands

Hello, I have a Application which needs to run shell scripts in a elevated state (root) for system interrogation. So I execute each script using bash -C. This has worked really well. I now want to add another layer of security, I cant inspect each of the scripts before they get deployed to the... (4 Replies)
Discussion started by: tjones1105
4 Replies

9. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies
MSGUNTYPOT(1p)							    Po4a Tools							    MSGUNTYPOT(1p)

NAME
msguntypot - update PO files when a typo is fixed in POT file SYNOPSIS
msguntypot -o old_pot -n new_pot pofiles ... DESCRIPTION
When you fix a trivial error which surely doesn't affect translations (e.g. a typo) in a POT file, you should unfuzzy the corresponding msgstr in the translated PO files to avoid so extra work to the translators. This task is difficult and error prone when done manually, and this tool is there to help doing so correctly. You just need to provide the two versions of the POT file: before the edition and after as marked in the above synopsis, and it all becomes automatic. HOW TO USE IT
In short, when you discover a typo in one of your [english] message, do the following: - Regenerate your POT and PO files. make -C po/ update-po # for message program translations debconf-updatepo # for debconf translations po4a po4a.conf # for po4a based documentation translations or something else, depending on your project's building settings. You know how to make sure your POT an PO files are uptodate, don't you?? - Make a copy of your POT file. cp myfile.pot myfile.pot.orig - Make a copy of all your files. mkdir po_fridge; cp *.po po_fridge - Fix your typo. $EDITOR the_file_in_which_there_is_a_typo - Regenerate your POT and PO files. See above. At this point, the typo fix fuzzied all the translations, and this unfortunate change is the only one between the PO files of your main directory and the one from the fridge. Here is how to solve this. - Discard fuzzy translation, restore the ones from the fridge. cp po_fridge/*.po . - Manually merge the PO files with the new POT file, but taking the useless fuzzy into account. msguntypot -o myfile.pot.orig -n myfile.pot *.po - Cleanups. rm -rf myfile.pot.orig po_fridge You're done. The typo was eradicated from msgstr of both your POT and PO files, and the PO files were not fuzzyied in the process. Your translators love you already. SEE ALSO
Despite its name, this tool is not part of the gettext tool suite. It is instead part of po4a. More precisely, it's a random Perl script using the fine po4a modules. For more information about po4a, please see: po4a(7) AUTHORS
Martin Quinson (mquinson#debian,org) COPYRIGHT AND LICENSE
Copyright 2005 by SPI, inc. This program is free software; you may redistribute it and/or modify it under the terms of GPL (see the COPYING file). Po4a Tools 2014-06-10 MSGUNTYPOT(1p)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy