|
|
![]() |
|
|
|
|
||
|
Confirm File Deletions in Qshell Hey, Ted: I accidentally deleted a file in Qshell. I know about the -i option for the rm command, but I forget to use it. Is there any way I can make the -i option the default setting?
-- Lynn Use an alias, Lynn. An alias is an alternate name for a command string. Add the following line to the .profile file in your home directory. alias rm='rm -i' If you want to change the default for all users, edit /etc/profile instead. When you run the rm command, Qshell will substitute rm -i for the rm you type. You will see the following message for each file specified as an argument to the command. rm: 001-2145 Do you want to remove the file or directory myfile (Y or N)? You will have to type the letter y (in either upper- or lowercase) and press Enter to delete a file. Be aware that the cp and mv commands replace files without warning. Like rm, these commands can take the -i option. You may want to define similar aliases for these two commands. If the rm alias is defined, but you wish to avoid the confirmation prompt, use the -f option. rm -f myfile If you prefer, you can precede the command with a backslash (\) to avoid the prompt for confirmation. \rm myfile To see a list of defined aliases, type alias with no arguments on the Qshell command line and press Enter. -- Ted
|
Editors
Contact the Editors |
|
Last Updated: 8/02/02 Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved. |