• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Confirm File Deletions in Qshell

    August 2, 2002 Timothy Prickett Morgan

    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

    Sponsored By
    TRAMENCO

    The Training and Mentoring Company (Tramenco) is dedicated to just one thing: Advancing your career by giving you the skills you need to solve real-world business problems.

    Choose from a menu of training options to fit your needs: onsite seminars, public seminars, mentoring, consulting, books, CBTs, and Web-based training.

    For more information about Tramenco’s career enhancing opportunities, call (800)421-8031 or go to www.tramenco.com.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 58 -- August 2, 2002

    Sponsored by
    New Generation Software

    “Fixing Your Data Supply Chain”

    FREE Webinar

    You’ve optimized your business processes, products and services, but is there still a logistics gap between your data and your managers and analysts?

    See how NGS-IQ simplifies query, reporting, data visualization, and analytics tasks. Enjoy Microsoft 365 integration, multidimensional modeling, built-in email, and FTP – with IBM i security and performance.

    October 23, 2025, 11am Pacific/2pm Eastern

    RSVP: https://ngsi.news/chain

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Changing Languages on a 5250 Screen Valuable Newsletters

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 58

This Issue Sponsored By

    Table of Contents

    • Free Software from Kisco
    • Looking for Number Two
    • Confirm File Deletions in Qshell

    Content archive

    • The Four Hundred
    • Four Hundred Stuff
    • Four Hundred Guru

    Recent Posts

    • Positive News From The Kyndryl Mainframe Modernization Report
    • NAViGATE, inPower 2025 On Tap for September 2025
    • Guru: WCA4i And Granite – Because You’ve Got Bigger Things To Build
    • As I See It: Digital Coup
    • IBM i PTF Guide, Volume 27, Number 37
    • AI Is Coming for ERP. How Will IBM i Respond?
    • The Power And Storage Price Wiggling Continues – Again
    • LaserVault Adds Multi-Path Support To ViTL
    • As I See It: Spacing Out
    • IBM i PTF Guide, Volume 27, Numbers 34, 35, And 36

    Subscribe

    To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

    Pages

    • About Us
    • Contact
    • Contributors
    • Four Hundred Monitor
    • IBM i PTF Guide
    • Media Kit
    • Subscribe

    Search

    Copyright © 2025 IT Jungle