[SOLVED] Mac OS X-like 'view' CLI command for Linux?

On the Mac, you can type 'view example.doc' to have OpenOffice open it, or 'view image.png' to have the image viewer open it, etc.
Is there something similar on Linux?
(I've searched but can't find anything.)
Last edited by chrispoole (2009-05-13 11:52:19)

Aprz wrote:
Agent69 wrote:
chimeric wrote:
In case you're using zsh as your shell of choice you could also use alias -s style aliases:
alias -s doc=openoffice
alias -s cpp=gvim
Typing the filename and hitting enter should then open it in the defined application.
Damn that's slick. I've always stuck with Bash but I might have to reconsider (unless Bash 4 has this feature).
It does except without the "-s". :s By default, in your ~/.bashrc, it already has "alias ls='ls --color=auto'".
Read it again.  These aren't ordinary aliases.  I interpret chimeric as saying that  in zsh the -s option allows you to associate file extensions with commands, not simple text replacement like your example.

Similar Messages

  • 1142 Autonomous Cli commands for 40MhZ bonding DFS

    Does anyone know of a command that I can issue from the CLI that will inform me of the two channels that the AP is using to bond for the 40MhZ width when I select DFS.  I know I can choose either above or below.  Does it just use the next channel ?  So if DFS selects 36 does it just automatically the next channel up if I have 40Mhz Above selected?
    I have autonomous 1142's and I would like to know what the 2nd Channel.  Keep in mind these are Autonomous AP's.
    Also would like to know a CLI command to find out what the channel currently is for either radio if DFS is selected?
    Any docs on CLI commands for the 1142 would be appreciated.
    Thank you!

    Yes, if you configure 40MHz above it will just use the next channel.  Same with 40MHz below, it will just use the next channel down.
    To see which channel the AP is currently using you can look under "show controller d1"

  • Need CLI commands for WPA2 Personal Mode

    I've seen this example, but I need the CLI the gui generates. Can anyone help out please?
    https://www.cisco.com/en/US/tech/tk722/tk809/technologies_configuration_example09186a008054339e.shtml#pers
    This is what I need to accomplish w/o the gui interface on an 1142N running 12.4
    Configure in Personal Mode
    The term personal mode refers to products that are       tested to be interoperable in the PSK-only mode of operation for       authentication. This mode requires manual configuration of a PSK on the AP and       clients. PSK authenticates users via a password, or identification code, on       both the client station and the AP. No authentication server is necessary. A       client can gain access to the network only if the client password matches the       AP password. The password also provides the keying material that TKIP or AES       uses to generate an encryption key for the encryption of the data packets.       Personal mode is targeted to SOHO environments and is not considered secure for       enterprise environments. This section provides the configuration that you need       to implement WPA 2 in the personal mode of operation.

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin-top:0in;
    mso-para-margin-right:0in;
    mso-para-margin-bottom:10.0pt;
    mso-para-margin-left:0in;
    line-height:115%;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;}
    Hi,
    Below are the CLI commands for WPA2 personal mode
    Configure terminal
    interface dot11Radio 0
    encryption mode ciphers aes-ccm
      or
      encryption vlan mode ciphers aes-ccm < --- If you have multiple vlans
    exit
    dot11 ssid
        authentication open
        authentication key-management wpa version 2
        wpa-psk ascii
    Regards,
    Madhuri

  • CLI commands for remote network

    I have a 800 router connected to our HQ via site-to-site vpn.
    I have commands i wish to run from the CLI but cannot get them to work.
    Pings fails from the CLI if using 'ping x.x.x.x' but are successful if using 'ping x.x.x.x source x.x.x.x'
    I am guessing all local CLI commands are trying to direct via the WAN as default, how can I resolve this for commands i wish to direct via the VPN.
    The command I really want to run is 'logging host x.x.x.x', with the syslog host being in HQ via the vpn tunnel

    IOS is always choosing interface which is closest to destination (i.e. consults routing table), when sourcing traffic from the box. 
    There are several commands (usually one-two per feature to override this behavior). 
    For the command you're looking for.
    Spoke1(config)#logging source-interface ?
    Async Async interface
    Auto-Template Auto-Template interface
    BVI Bridge-Group Virtual Interface
    CDMA-Ix CDMA Ix interface
    CTunnel CTunnel interface
    Dialer Dialer interface
    Ethernet IEEE 802.3
    GMPLS MPLS interface
    LISP Locator/ID Separation Protocol Virtual Interface
    LongReachEthernet Long-Reach Ethernet interface
    Loopback Loopback interface
    MFR Multilink Frame Relay bundle interface
    Multilink Multilink-group interface
    Null Null interface
    Serial Serial
    Tunnel Tunnel interface
    Vif PGM Multicast Host interface
    Virtual-PPP Virtual PPP interface
    Virtual-Template Virtual Template interface
    Virtual-TokenRing Virtual TokenRing
    vmi Virtual Multipoint Interface

  • HOWTO: Example CLI commands for CS4 ARD install from a network volume

    So, I have been meaning to post up now I've done a couple of successful installs using this command set.
    After following the instructions to build a Manual Enterprise Deployment, Adobe recommends that you copy your completed package to the machine and execute it from there. But I found it much easier to just create a network volume that could be accessed by an authorized installer user and mount that and run the install from there instead.
    For this example I've assumed:
    A server called "server.local"
    An install user called "adobeinstaller" with passwd "installerpasswd"
    A network share that only the above user can access called "cs4stdvol", containing just the contents of the folder that contains "Setup" off the Adobe Design std Install DVD
    A folder called "/Volumes/cs4stdvol" to mount the network share to (if you have a bunch, you may want to consider one mount point with a bunch of subfolder installers)
    The actual Unix commands to issue are as follows (make sure to execute as root!):
    mkdir /Volumes/cs4stdvol; mount_afp afp://adobeinstaller:[email protected]/cs4stdvol /Volumes/cs4stdvol/; /Volumes/cs4stdvol/Setup.app/Contents/MacOS/Setup --mode=silent --deploymentFile=/Volumes/cs4stdvol/install.xml; umount /Volumes/cs4stdvol/
    Basically, the gist of it is:
    Make a folder in /Volumes to mount the network share at.
    Mount the network share using whatever username and passwd you created.
    Run the Adobe Setup app as root in silent mode with the deployment file you created by reading through the setup instructions in the Manual Enterprise Deployment Help.
    Unmount the network share (which also automatically deletes the folder from /Volumes).
    Hope this helps others,
    Eric.

    So, I have been meaning to post up now I've done a couple of successful installs using this command set.
    After following the instructions to build a Manual Enterprise Deployment, Adobe recommends that you copy your completed package to the machine and execute it from there. But I found it much easier to just create a network volume that could be accessed by an authorized installer user and mount that and run the install from there instead.
    For this example I've assumed:
    A server called "server.local"
    An install user called "adobeinstaller" with passwd "installerpasswd"
    A network share that only the above user can access called "cs4stdvol", containing just the contents of the folder that contains "Setup" off the Adobe Design std Install DVD
    A folder called "/Volumes/cs4stdvol" to mount the network share to (if you have a bunch, you may want to consider one mount point with a bunch of subfolder installers)
    The actual Unix commands to issue are as follows (make sure to execute as root!):
    mkdir /Volumes/cs4stdvol; mount_afp afp://adobeinstaller:[email protected]/cs4stdvol /Volumes/cs4stdvol/; /Volumes/cs4stdvol/Setup.app/Contents/MacOS/Setup --mode=silent --deploymentFile=/Volumes/cs4stdvol/install.xml; umount /Volumes/cs4stdvol/
    Basically, the gist of it is:
    Make a folder in /Volumes to mount the network share at.
    Mount the network share using whatever username and passwd you created.
    Run the Adobe Setup app as root in silent mode with the deployment file you created by reading through the setup instructions in the Manual Enterprise Deployment Help.
    Unmount the network share (which also automatically deletes the folder from /Volumes).
    Hope this helps others,
    Eric.

  • I have CS 4 Design Premium CS4 (Mac) and would like to get replacement for my faulty Install DVD

    Any suggestions how I can do this?

    We cannot provide you any replacement DVD for DP CS4 as its a very old product and we donot have the installer for that. However, you can use the below link to download DP CS4 but make sure to read the download instructions properly.
    http://prodesigntools.com/download-adobe-cs4-and-cs3-free-trials-here.html

  • Operating System commands for LINUX OS

    Hi,
    I am working on PI7.1 OS LINUX,i am clear about WINDOWS OS how to call and execute but not clear with Linux OS
    Just trying one POC kind of requirement with Operating System Commands
    first i started with simple requirement moving one file from one directiry to other directiory,but unfortunaltly i was not sucesfull.
    the help documentation also not clear ,could you please any one give some clear clue to hoW  to call shell script.
    i have created below script.
    #!/bin/sh                                                                                cd /Interface                                                                               
    cat BIA1.xml >> /interfaces/BIA2.xml  
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
    thanks,
    Raj

    hi its very simple,just copy .sh file in PI server and call just sh path.it will work

  • [SOLVED] Build nvidia-173xx (173.14.31-7) for linux-ck-kx (3.4.1-2)

    I need a bit of help here. For a few months I have been using the proprietary nvidia-173xx driver for my old NV34 / GeForce FX 5200 (I have a downgraded xorg-1.10 and a compatible nvidia-173xx-utils (173.14.31-1)).
    I have four kernels, and I used to be able to build the nvidia-173xx module without problems for all four kernels.
    However, after the recent upgrade from linux-ck-kx-3.3 to linux-ck-kx-3.4 I can no longer build the nvidia-173xx for this kernel (but it still builds fine for the three other kernels on my system).
    Here is the error I receive:
    $ makepkg -sfci
    ==> Making package: nvidia-173xx-ck-kx 173.14.31-7 (Wed Jun 6 10:46:18 EDT 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Found NVIDIA-Linux-x86_64-173.14.31-pkg0.run
    -> Found generated.patch
    ==> Validating source files with md5sums...
    NVIDIA-Linux-x86_64-173.14.31-pkg0.run ... Passed
    generated.patch ... Passed
    ==> Extracting Sources...
    ==> Starting build()...
    Creating directory NVIDIA-Linux-x86_64-173.14.31-pkg0
    Verifying archive integrity... OK
    Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 173.14.31....................................................................................................................................
    patching file conftest.sh
    Makefile:339: /lib/modules/3.4.1-2-ck/build//Rules.make: No such file or directory
    make[1]: *** No rule to make target `/lib/modules/3.4.1-2-ck/build//Rules.make'. Stop.
    make: *** [module] Error 2
    ==> ERROR: A failure occurred in build().
    Aborting...
    I don’t know what to make of this error ; I’ve looked in `/lib/modules/<kernel-versions…>…' but I don’t see any file named `Rules.make' in there…
    Here are the files I use for building the modules (they are all slightly customized PKGBUILDs based on AUR/nvidia-173xx) :
    core/linux               --> PKGBUILD  --> nvidia.install
    core/linux-lts           --> PKGBUILD  --> nvidia.install
    AUR/linux-lts-ck       --> PKGBUILD  --> nvidia.install
    repo-ck/linux-ck-kx  --> PKGBUILD  --> nvidia.install
    In this list, #1-3 still build without a hitch, only #4 throws the error I pasted above. Ideas? Thanks in advance!
    Last edited by Montague (2012-06-07 21:53:12)

    Well nevermind, I don’t know what I was doing wrong before, but with yesterday’s update of nvidia-173xx (patch not longer required) and nvidia-173xx-utils in the AUR, I was able to upgrade to X.org-1.12, and I re-built the nvidia module for all my kernels. I now have a fully current arch system, yay !
    In case this is useful to anyone, here are the slightly modified PKGBUILD and nvidia.install that I used (based on natrio’s package in the AUR)

  • Command for buld signature retirement on non-IOS devices..

    Anyone know the CLI commands for buld signature retirement on IDSMs or other non-IOS devices? Thanks...

    Assuming you asking about how to retire/remove a signature using the CLI, here's how:
    On routers
    ip ips signature-definition 
    signature 5733 0
    status
    enabled false
    retired true
    end
    On sensors
    configure terminal
    service signature-definition sig1
    signatures 12000 0
    status
    enabled false
    retired true

  • How to vertical select a text in iWord.  Like we do in Mac version of MS Word by Command Option [and selecting]

    How to vertical select a text in iWord.  Like we do in Mac version of MS Word by Command Option [and selecting]

    m0thr4 wrote:
    I want to make sure all text in my document is a particular font (at least), but Cmd+a only selects any text that is not in a table. There seems to be no way to include text in tables, or even a way to change the format of all text in a particular table (MS Word allows the whole table to be highlighted for example).
    A double click in a cell selects it so you may enter what you wish in it.
    Select the cell A1 then, pressing the shift key, click in the right-bottom cell.
    Doing that you will get every table's cells selected which gives the ability to apply global attributes.
    I've searched the built-in help and found "To select all text in a document, choose Edit > Select All." This does not work as tables are excluded from this selection. If tried some of the other suggestions, such as holding down shift while selecting text in tables, but as soon as I get to the end of the text in one cell, the selection disappears.
    My guess is that some words are missing in the Help. Select All selects all the text … of the text layer.
    We must apply the settings to the text layer, to each text box, to each table.
    Of course, you may _Go to "Provide Pages Feedback" in the "Pages" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'09
    Yvan KOENIG (from FRANCE vendredi 10 octobre 2008 17:16:06)

  • Hello, I update my mac pro to 10.10. Why the photoshop cs6 change to slowly now. When I change the tools like brush to command+Z, It's will be freeze a while. why? and how can I improve?

    hello, I update my mac pro to 10.10. Why the photoshop cs6 change to slowly now. When I change the tools like brush to command+Z, It's will be freeze a while. why? and how can I improve?

    what a long post....Apple, btw, does not read this stuff, so ranting, raving, and complaining here might make you feel good, but it does no good at all. That being said, I, too have a Mac Pro Quad Core Xeon with 6 gigs of ram and an nVidia 8800 GT graphics card (not as good as yours, alas) and I've had no problems at all with it. Yes, it doesn't have Thunderbolt, but maybe we Mac pro owners will get lucky and someone will come out with an adapter (probably not). No, you probably don't have to throw away your Mac Pro, but if you do, I'll take it, for a small "recycling" fee >:-) That was a joke.  Yes, the Mac Pro's future isn't quite clear, YET. Hopefully that will improve very soon. As for not being able to upgrade to Mountain Lion. Don't worry about that too much, Nobody is forcing you to do that.  Your Mac Pro won't quit working if it isn't installed. From what  I've heard, you should give the new OS a chance, and wait to get it, in case there might be some bugs, or stuff not working with the new OS, which has been known to happen. Yes, we Mac Pro owners don't like being treated like mushrooms-kept in the dark, and being fed......... but Apple is Apple and it will do what it does, and there is nothing you or me can really do to change that. All I can say is....trust, have faith, be patient, go for a walk, do something else to take your mind off of this problem. IF apple decides to drop the Mac Pro for good, and that's a big "IF", I think they will anger a whole bunch of people
    which isn't good. However, that hasn't happened...YET. Let us hope that it doesn't
    John B

  • Locate a remote host MAC on a Root-Bridge (CLI)

    Does anyone know a set of CLI commands that I can use to determine the IP address for the Non-Root bridge (Cisco 1310 running 12.4(25d)JA1) that a given MAC address is behind. For this case, the root-bridge is trunking VLANs across to several non-root bridges. On a wired network, tracing out the L2 path to the client switch port is farely simple to script in linux. When Cisco bridged wireless is in the mix for trunking where physical medium is not possible, not so simple. I appreciate any pointers. Thanks.                  

    As long as I know java doesn't have support to work on link-layer, only internet and transport layers. You may write simple native code. On windows, IP Helper functions, like SendARP allow you to pass an IP address and get the hardware address. You store the hardware address on your database/file and later, when that machine is off, you send a frame to the address you stored previous.
    [http://msdn.microsoft.com/en-us/library/aa366071(VS.85).aspx]
    I haven't seen it on Linux, but if you need help let me know I'll check the Linux API's too.

  • Which is better for solving Mac issues

    I have been experiencing Kernel Panics and program crashes. I want something that is good for testing hardware and OS issues. Can either of these find corrupted data files? I am looking at two utilities for purchase. Which is better for solving Mac Issues?
    TechTool Pro
    or
    Disk Warrior?

    When you say "complete bootable backup" do you mean that it contains the OS + all my applications? Basically a clone of the start-up?
    Yes, you have that very clear. I use Tri-backup or CCC for this normally, but there are other options.
    If I have this clone, and I start getting issues on my Mac, I can Zero the HD and reinstall the OS via the clone (including all the applications)?
    Yes, and if pressed for time you can just keep working off the Clone.
    I can Zero the HD and reinstall the OS via the clone (including all the applications)?
    Yep, right back to 100%, excluding HW issues.
    With all my software... it takes a day to reinstall all of it to a complete image.
    Yes, the only sensible thing is a Clone... or two. Most problems can be overcome by simply Verifying/Repairing the HD once in awhile, Repairing Permissions before and after every update/upgrade, and turning off Auto Updates in SW Update CP... wait a couple of weeks and check these forums for the number of problems with any update.
    PS. DiskWarrior has saved me hundreds of times from having to do complete new Installs or cloning back of Installs, I figure that's saved me 10's of thousands of hours & grief... I appreciate Alsoft so much that I don't even go for the generous upgrade offers on new versions... I just buy the new version completely at Retail.
    PPS. Funny thing, you'll read something like DiskWarrior is a one Pony Dog Show or something... just does one thing... I just have to laugh outloud... Yeah, the one thing is... cure my incurable Mac Problems 99.9% of the time!

  • Always open Mac HD in list view How To?

    How do you Always open your Mac HD in list view. 10 x out of 10.
    After restarting or logging on again.
    I double click my Macintosh HD desktop icon.
    It opens in icon View
    Under View Tab in Finder
    I select "Show View Options" last choice
    Mac HD small View Option window opens
    I unselect "Always open in icon view"
    I reselect the original Mac HD window
    and click the 2nd icon with 4 horizontal lines= list view.
    The Mac HD small View Option window now changes to "Always open in list view" Use as Default is Grayed out. (I have also tried switching one of the "Show Colums:" subcategories such as "Version" to ungray "Use as Defaults" and now click "Use as Defaults"
    I close the small Mac HD View Option window.
    I close the original Mac HD window with small icon next to words.
    I log out
    I log in double click my desk top Macintosh HD icon and the window seems to Always open in icon view.
    Any help for this ongoing problem would be appreciated.
    THANKS

    Download TinkerTool - CNet Downloads or MacUpdate. Use the General page and check the option at the top to display invisible files. Click the button to relaunch the Finder. In the window you want locate the .DS_Store file and drag it to the Trash. Empty the Trash. Uncheck the invisibles option box in TinkerTool then the Relaunch Finder button. Quit TinkerTool. Locate /Home/Library/Preferences/com.apple.finder.plist file and drag it to the Trash. Don't empty the Trash.
    Now in the desired Finder window reset all your default view options by clicking in the Finder window then pressing COMMAND-J to option the View Options dialog. Do not close this window. Now try restarting. Your window should open on restart automatically in the view you desire. Should you close that window anytime reopen it by clicking on the Finder icon in the Dock, not by double-clicking on the disk icon on your Desktop.

  • How do I turn off the alt scroll zoom?  When I'm in Adobe photoshop and illustrator using the pen tool, alt is utilized for another short cut.  I would like to use the alt command for the pen tool instead of zooming into the screen.

    How do I turn off the alt scroll zoom? 
    When I'm in Adobe photoshop and illustrator using the pen tool, alt is utilized for another short cut.  I would like to use the alt command for the pen tool instead of zooming into the screen.

    I tend to select things from left to right and every time I am moving in a downward right diagonal motion during lasso selection I am missing a clear view and I am tending to have a more sloppy selection.  All this does is slow me down since I need to go back and hit those areas again.  The big arrowhead just get's in the way.  The original lasso tool with the thin line and small active point at it's lower left was far better for me.
    I don't like turning the cursors to precise because I like to see the active tool icon where my cursor is and as the icon changes as I hold modifier keys down.  If I am forced to get comfortable with using pricise cursors I guess I will, but man, I've never had to do this in my 15 years of photoshop use...
    I would absolutely LOVE to find a way to get the old lasso icon -- without the arrowhead above it.
    Is there any chance this option could be inlcuded in cursor preferences?  I'd give much thanks, Adobe.

Maybe you are looking for

  • Very urgent..Can a batch file be executed from a button in application?

    HI! Please this is very urgent.. I want to know wheather it is possible to provide a button in an htmldb application, that executes a batch(dos .bat file) file from a network location???? Thanks Asit. Message was edited by: user459887

  • XI 3.0 Sender File adapter fails to initialize

    Hello, File adapter fails to initialize with error: xml.fieldFixedLengths or xml.fieldSeparator is missing. But in the communication channel parameters definition in the 'contents conversion parameters' box I have the following: xml.fieldSeparator   

  • LION - Safari missing plug-in

    Well, LION 10.7.1 is here....informing us "Address an issue that may cause the system to become unresponsive when playing a video in Safari".... the  "Missing plug-in" issue has not been fixed, no change at all. Not sure what kind of UAT testing they

  • Software updates do not appear under Updates

    Software updates do not appear under Updates in the Mac App Store.  So far, I have not been able to select or install the newest Yosemite update (10.10.1) and the latest iTune update.  What could be the problem?  Third party software shows and will u

  • Can't download songs/podcasts,  -69 error message

    I bought a song last week from the iTunes Store, and the download failed, saying: "There was a problem downloading (song). An unknown error occurred (-69). Please check that the connection to the network is active and try again." Since it first happe