Linux server(how to save command out put to another file. )

hi all,
i have Q ?
how to save command out put to another file.
Ex: #ps -ef
that particular cmd output i need to save another file.
is it possible ...if possible ..please let me know
And how to save command history in Linux.

df -h >> /oracle/output.log
/oracle -- mount point name
Regards
Asif Kabir

Similar Messages

  • Newbie question - how to save images out of an fla file

    I have what I'm sure is a very basic flash question. I have a flash movie (swf) and the accompanying fla file. I can open the fla file, and see all the images used in the file (symbols in the library), but how can I export or save one of these images separately from flash?

    you can right click, copy an image and then paste it into your choice of photoediting software.

  • Run Clear Case command from java and save the out put in to a file.

    Can any one help me out ...
    I want to execute Clear case command from a java and want to save the out put of this command to a file.
    I am naot able to find out how to start..
    Message was edited by:
    chandra_verma

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to configure header out put preview in Sales Order

    Hi ,
               i have couple of questions.....
    1,How to configure header out put preview?
    2.Step by step procedure to configure handling units
    Points for right answer
    Lekha

    Hi,
    You can use the FM ..RV_MESSAGE_UPDATE..
    Thanks
    Naren

  • How to save Internal table as a local file?

    Hi,
    How to save Interanl table as a local file ?
    I had some data which i had selected in Interanl table and would like to send this as an attachment by attaching internal table contents as a local file--

    Hi friend,
    See sample code for GUI_DOWNLOAD.
    *Types
    TYPES: BEGIN OF g_r_mara,
           matnr LIKE mara-matnr,
           ersda LIKE mara-ersda,
           laeda LIKE mara-laeda,
           mtart LIKE mara-mtart,
           mbrsh LIKE mara-mbrsh,
           END OF g_r_mara.
    *Data
    DATA: g_t_mara TYPE TABLE OF g_r_mara,
          filename TYPE string.
    *Tables
    TABLES: mara, sscrfields.
    *Selection Screen
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 10(20) text-001 FOR FIELD p1.
    SELECTION-SCREEN PUSHBUTTON 12(20) word USER-COMMAND uc.
    SELECTION-SCREEN END OF LINE.
    *Initilizing data.
    INITIALIZATION.
      word = 'word'.
      filename = 'C:\Testing.doc'.   <------- File name and location
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
        WHEN 'UC'.
    *Data retrival
          SELECT matnr ersda laeda mtart mbrsh
            INTO  CORRESPONDING FIELDS OF TABLE g_t_mara
            FROM mara
            WHERE matnr IN s_matnr.
    *Downloading data from internal table to excel
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              filename              = filename
              filetype              = 'ASC'
              write_field_separator = 'X'
            TABLES
              data_tab              = g_t_mara.
      ENDCASE.
    (Note: Downloaded file is in C:\Testing.doc)
    You can change the file format by changing the extension in filename.
    Might helpful for u.
    Thanks..

  • Priniting out put to pdf file

    Hi All,
    I am using oracle reports 6i under sun Solaris environment. I may finally deploy these reports on web. Is it possible to send the out put to pdf when ever user select from my web deployed form, I mean when ever user select reports from the web is it possible to send the out put to pdf file it should open on client browser. Please help me. I appreciate any ones help.
    Thanks,
    Kate.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by VK:
    set the DESFORMAT system parameter PDF. DESFORMAT make sense only if the DESTYPE is file. you have to set these parameters dynamically
    <HR></BLOCKQUOTE>
    I think, well, I am sure that DESTYPE=cache also works, as long as your web server outputs proper mime header for pdf files. Here is an example (sensitive information replaced with # character):
    --------------- http://###.example.com/db/rp?server=Rep60.example.com&report=XXXXXXInvoice.rdf&userid=XXXX/XXXX@XXXX&desformat=pdf&destype=cache&P_1=218
    null

  • How can I print out a complete pdf file of PSE 10 user guide?

    This is worse than trying to deal with the government bureaucrats....I am simply asking how I can print out a complete pdf file of the user guide for PSE 10...I had one for version 9 but cannot get anything for version 10??? The address shown in the getting started manual doe snot go through??? HELP!!!

    Download from here:
    http://help.adobe.com/en_US/elementsorganizer/using/elementsorganizer_10_help.pdf
    for the Organizer
    and this faq:
    http://forums.adobe.com/thread/992825?tstart=0

  • ANYBODY KNOW how to save a swatch in an ID file at a percentage?

    ANYBODY KNOW how to save a swatch in an ID file at a percentage?
    So that every time it's used, it applies that percentage automatically?

    LOL...nevermind. Took me 2 seconds to realize all I needed to do after posting this. Sad trombone.

  • How do I create a hyperlink to another file?

    How can I create a hyperlink to another file on my Mac?

    Do you really mean "Hyperlink" as in a web page link to your file?
    Or do you want a Mac OS X Alias icon placed in a different folder or on your desktop to a file?  Hold Command-Option keys while dragging the file to a new folder, will create an Alias.
    Or perhaps a Unix Symbolic Link (similar to a Mac OS X Alias, only different).  This is done from a Terminal session using "ln -s /path/to/your/file /path/to/folder/where/symlink/to/be/placed"

  • How to display the out put of the sql query in a text file using forms

    I want to display the out put of the sql query in a text file using forms 6.0.Same could be done using spool command in sqlplus but i want it using forms....Fiaz

    Have a look at the text_io package:
    http://www.oracle.com/webapps/online-help/forms/10g/state?navSetId=_&navId=3&vtTopicFile=f1_help/oraini/c_text_io.html&vtTopicId=
    cheers

  • How can send servlet out put to jsp

    Hi friends,
    my problem is ..
    1.In my jsp (let us assume that Test.jsp ) emded tag which emding out put from Servlet.. like
    <embed name="svg" border="1" type="image/svg+xml" width="100%" height="100%" src="http://localhost:8080/demo/Test?"/>
    here the jsp is calling Servlets but at the time display the jsp cannot understand the out put comming from servlets ..
    plz help how can read a Servlet data from JSP
    thanks

    Use <jsp:include page="relative_url_to_servlet"/>. Then have your servlet get the PrintWriter for output from response.getWriter() and you should have it.
    I do this every once in awhile.

  • How to fixe exception out put of memory ?

    Hello,i did a web application (asp.net/c#/crystal reports),i used more than 35 tableAdapter and when i'm trying report after some time i remark the memory increase more and more until i get Out Put memory Exception. how can i fix this problem ?
    please help me

    Hi,
    this is the forum for Microsoft Office Visio.
    It seems from your question that you need assistance with Visual Studio.
    The Visual Studio forums are located in MSDN, not here in TechNet.
    Try here:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=visualstudiogeneral
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • I have a file it has a Hold - There are a number of holds in the hold list how do i find out which one this file has

    Hi
    I have a file which has a Hold.
    However, It could be one of a number of Holds as defined by the Holds list. How do I (ideally in PowerShell) find out which hold is being used to hold the file and how can I remove that Hold from the file so I can change it and re-apply the hold ?
    Thanks
    Nigel
    Nigel Price NJPEnterprises

    Hi,
    According to your post, my understanding is that you want to remove Hold from the file.
    If an item has been added to more than one hold, you can view the list of holds that pertain to that by using the Compliance Details command.
    Open the list or library that contains the item for which you want to view the hold information.
    Point to the item that you want, click the arrow that appears, and then click Compliance Details.
    On the Compliance Details dialog, click Add/Remove from hold.
    On the Hold Status page, click the arrow under the Remove from hold option to view a list of holds the item is associated with.
    You can use the Compliance Details command to remove an individual item from a hold.
    Open the list or library that contains the item that you want to remove from a hold.
    Point to the item that you want, click the arrow that appears, and then click Compliance Details.
    In the Hold Status section, click Add/Remove from a hold.
    On the Item Hold Status page, select the Remove from hold option and then select the hold from which you want to release the item.
    Click Save.
    For more information, you can refer to:
    Create a hold to suspend documents or items
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How to save from a JTable to .CSV file format?

    i am building a client sever model in which the client will send the details to the server...
    the server will take all the details and display it in a jtable..
    now, after sorting it using autorowsorter(..), how can i save the data from table to a .CSV file???
    Thanks in advance..

    Here is one code from my own my application. It should compile straight away, but if there are any compile time bugs, you can easily fix them. Pls do read the comments at the top.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.table.*;
    * This class is now JDK 1.6 Dependent, with the addition of the use of the Desktop
    * class instead of the default application launch procedure, and the use of the new
    * FileNameExtensionFilter class introduced under javax.swing.filechooser.
    * This class can be used in one line of code by passing the appropriate JTable to the
    * desired constructor.
    public class ExcelExporter extends Object {
        public JTable source;
        public JFileChooser chooser;
        public File csvFile;
        private boolean cancelOp = false, isDefault = true;
        private String topText = "";
        public ExcelExporter(JTable source) {
            this(source, "");
        public ExcelExporter(JTable source, String topText) {
            this(source, topText, true);
        public ExcelExporter(JTable source, String topText, boolean isDefault, File target, JProgressBar bar) {
            super();
            this.source = source;
            this.topText = topText;
            this.isDefault = isDefault;
            new ProgressDialog(source, target, bar);
        public ExcelExporter(JTable source, String topText, boolean isDefault) {
            super();
            this.source = source;
            this.topText = topText;
            this.isDefault = isDefault;
            obtainFileName();
        public void obtainFileName() {
            cancelOp = false;
            FileNameExtensionFilter filter = new FileNameExtensionFilter("Excel Format (CSV)", "csv");
            if(chooser == null) {
                chooser = new JFileChooser();
                chooser.setDialogTitle("Saving Database");
                chooser.setFileFilter(filter);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                chooser.setSelectedFile( new File("database.csv") );
                chooser.setAcceptAllFileFilterUsed(false);                     
            int val = chooser.showSaveDialog((Component)null);
            if(val == JFileChooser.APPROVE_OPTION) {
                csvFile = chooser.getSelectedFile();
                boolean fixed = fixExtension(csvFile, "csv");
                if(!fixed && !cancelOp) {
                    JOptionPane.showMessageDialog(null,"File Name Specified Not Supported",
                    "File Name Error", JOptionPane.ERROR_MESSAGE);
                    obtainFileName();
                    return;
                if(!cancelOp) {
                    //storeTableAsCSV(csvFile, source);
                    new ProgressDialog(source, csvFile).setVisible(true);
        public boolean fixExtension(File file, String prefExt) {
            String fileName = file.getName();
            String dir = file.getParentFile().getAbsolutePath();
            String ext = null;
            try {
                ext = fileName.substring( fileName.lastIndexOf("."), fileName.length() );
                System.out.println("Original File Extension: " + ext);
            } catch(StringIndexOutOfBoundsException e) {
                ext = null;
            if(ext != null && !ext.equalsIgnoreCase("."+prefExt)) {
                return false;
            String csvName = null;
            if(ext == null || ext.length() == 0) {
                csvName = fileName + "." + prefExt;
            } else {
                csvName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + prefExt;
            System.out.println("Corrected File Name: " + csvName);
            File csvCert = new File(dir, csvName);
            if(csvCert.exists()) {
                int val = JOptionPane.showConfirmDialog(null, "Replace Existing File?", "File Exists",
                            JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
                if(val == JOptionPane.NO_OPTION) {
                    obtainFileName();
                    cancelOp = true;
                    return false;
                } else if(val == JOptionPane.CANCEL_OPTION) {
                    cancelOp = true;
                    return false;              
            if(!file.renameTo(csvCert)) {
                file = new File(dir, csvName);
                try {
                    file.createNewFile();
                } catch(IOException ioe) {}
            System.out.println("Exporting as: " + file.getAbsolutePath() );
            return true;
        public void storeTableAsCSV(File target, JTable src) {
            String csvData = topText + "\n\n";
            for(int i = 0; i < src.getModel().getRowCount(); i++) {
                for(int x = 0; x < src.getModel().getColumnCount(); x++) {
                    int col = src.convertColumnIndexToView(x);
                    String curVal = (String)src.getModel().getValueAt(i,col);
                    if(curVal == null) {
                        curVal = "";
                    csvData = csvData + removeAnyCommas(curVal) + ",";
                    if(isDefault) {
                        if(x == src.getModel().getColumnCount() - 3) {
                            csvData = csvData + "\n";
                            continue;
                    } else {
                        if(x == src.getModel().getColumnCount() - 1) {
                            csvData = csvData + "\n";                      
            try {
                FileWriter writer = new FileWriter(target);
                    writer.write(csvData);
                    writer.flush();
                    writer.close();
                writer = null;
                csvData = null;
            } catch(IOException ioe) {
                JOptionPane.showMessageDialog(source, "Error Writing File.\nFile may be in use by another application."
                + "\nCheck and try re-exporting", "Export Error", JOptionPane.ERROR_MESSAGE);
        public String removeAnyCommas(String src) {
            if(src == null) {
                return "";
            for(int i = 0; i < src.length(); i++) {
                if(src.charAt(i) == ',') {
                    src = src.substring(0,i) + src.substring(i+1, src.length());
            return src;
        class ProgressDialog extends JDialog {
            JProgressBar progress;
            JLabel progressLabel;
            javax.swing.Timer timer;
            int rowPoint = -1;
            StringBuffer data;
            JTable srcTable;       
            DefaultTableModel srcModel;
            File targetFile;
            public ProgressDialog(JTable src, File target) {
                super( new JDialog(), "Exporting", true);
                createUI();
                setLocationRelativeTo(null);
                srcTable = src;
                srcModel = (DefaultTableModel)src.getModel();
                targetFile = target;
                exportDataProgressively();
            public ProgressDialog(JTable src, File target, JProgressBar progress) {
                super();
                srcTable = src;
                srcModel = (DefaultTableModel)src.getModel();
                targetFile = target;
                setProgressBar(progress);
                exportDataProgressively();
            public void createUI() {
                progress = new JProgressBar(0, 100);
                progress.setIndeterminate(true);
                progress.setValue(0);
                progress.setBorder( BorderFactory.createCompoundBorder(
                                        BorderFactory.createEmptyBorder(10,10,10,10),
                                    UIManager.getBorder("ProgressBar.border") ) );
                progress.setPreferredSize( new Dimension(300, 38) );
                progressLabel = new JLabel("Writing Excel Format. Please Wait...");
                progressLabel.setFont( new Font("Verdana", Font.PLAIN, 11) );
                progressLabel.setBorder( BorderFactory.createEmptyBorder(10,10,10,10) );
                JPanel progressPanel = new JPanel( new BorderLayout() );
                    progressPanel.add(progressLabel, BorderLayout.NORTH );
                    progressPanel.add(progress, BorderLayout.CENTER);
                    progressPanel.setBorder( BorderFactory.createEmptyBorder(10,10,10,10) );
                setContentPane(progressPanel);         
                pack();
            public void exportDataProgressively() {
                //progress.setString("");
                progress.setMaximum(srcModel.getRowCount());
                progress.setIndeterminate(false);
                data = new StringBuffer("Autogenerated Excel Format"
                     + topText + "\n\n");          
                timer = new javax.swing.Timer(15, new ActionListener() {
                    public void actionPerformed(ActionEvent e) {                   
                        if(rowPoint > -1 && srcModel.getValueAt(rowPoint,0) == null) {
                            timer.stop();
                        progress.setValue(rowPoint);
                        appendData();
                timer.setRepeats(false);
                timer.start();
            public void appendData() {
                timer.stop();
                for(int j = 0; j < srcModel.getColumnCount(); j++) {
                    int col = srcTable.convertColumnIndexToView(j);
                    if(rowPoint == -1) {
                        data.append(removeAnyCommas((String)srcModel.getColumnName(col)).toUpperCase());
                    } else if(col != -1){
                        String text = (String)srcModel.getValueAt(rowPoint,col);
                        if(srcModel.getColumnName(col).equalsIgnoreCase("Phone Number(s)") && !isPrintableText(text) ) {
                            text = "\'" + getPrintableText(text);
                        } else if( srcModel.getColumnName(col).equalsIgnoreCase("Phone Number(s)") && isPrintableText(text)  ) {
                            text = "\'" + removeAnyCommas(text);
                        } else {
                            text = removeAnyCommas(text);
                        data.append(text);
                    if(isDefault) {
                        if(j != srcModel.getColumnCount() - 3 ){
                            data.append(",");
                        } else {
                            data.append("\n");
                            break;
                    } else {
                        if(j != srcModel.getColumnCount() - 1 ){
                            data.append(",");
                        } else {
                            data.append("\n");
                rowPoint++;
                if(rowPoint < srcModel.getRowCount()) {
                    timer.start();
                } else {
                    try {
                        if(!targetFile.exists())
                            targetFile.createNewFile();
                        FileWriter writer = new FileWriter(targetFile);
                            writer.write(data.toString());
                            writer.close();
                            progress.setValue(progress.getMaximum());
                            progress.setStringPainted(true);
                            progress.setString("Done");
                            openFile(targetFile);                      
                            setVisible(false);
                            data = null;
                    } catch(IOException ioe) {
                        JOptionPane.showMessageDialog(source, "Error Writing File. Try Resaving",
                        "Save Error", JOptionPane.ERROR_MESSAGE);
                    } catch(Exception exc) {
                        System.out.println(exc);
            public void setProgressBar(JProgressBar bar) {
                progress = bar;
            public boolean isPrintableText(String text) {
                return !text.contains("::");
            public String getPrintableText(String text) {          
                try {
                    text = text.substring(2);
                } catch(StringIndexOutOfBoundsException sie) {
                    System.out.println(sie);
                String generated = "";
                StringTokenizer st = new StringTokenizer(text, ",");
                try {
                    for(int i = 0; st.hasMoreTokens(); i++ ) {
                        if(i > 0) {
                            generated = generated + " / ";
                        String token = st.nextToken();
                        generated = generated + token.substring( token.indexOf("-") + 2 );
                } catch(NoSuchElementException nse) {}
                return generated;
            public void openFile(File file) {
                int val = JOptionPane.showConfirmDialog(null, "Would You Like To View The File Right Now?",
                "View File", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
                try {
                    if(val == JOptionPane.YES_OPTION) {
                        if(Desktop.isDesktopSupported()) {
                            Desktop.getDesktop().open(file);
                        } else {
                            new ExcelExecutor(file.getAbsolutePath());
                } catch(IOException ioe) {
                    JOptionPane.showMessageDialog(null, "Failed to Open File", "Error",
                     JOptionPane.ERROR_MESSAGE);
    }ICE

  • How do I find out if a class file has deprecated functions

    Currently I'm having problems with a old Visual Cafe class.
    It is definately using deprecated awt funcions.
    My question is..
    1) Without the source code how do I find out what deprecated functions the CLASS file is using.
    2) Has any deprecated class been truly scrapped ? If so, I cannot find
    it in the JDK API documentation or the java.sun.com search engine..

    Here is what I did, to answer your question. I unzipped the symantec jar and used a decompiler (JAD works fine, or cavaj) to create an entire src tree (you can do this with 1 command). Then, compile using your target version of Java. There are well over 100 warnings (with -deprecation on) ranging from Cafe's use of awt.Component methods (mostly), Thread.suspend in their Timer class, to the use of java.util.Date in their Calendar component.
    Cheers!

Maybe you are looking for

  • Problem in Cancellation of Excise invoice

    Hi, User has created Import PO then he made custom MIRO then GR is done and through J1iex part1 is done. later he realized that there is problem with PO condition for that he has first cancelled the GR then secondly cancelled Custom MIRO. now while d

  • Cannot Print to PDF - Driver issues (?)

    Hello, I can't print to PDF from InDesign or for that matter any of my other non-Adobe programs. All the file does in print in error in my PDF printer dialog box and nothing happens. Just to clarify, exporting as an interactive PDF is not the solutio

  • Quicktime encounters problem and must close. Sorry for inconvenience.

    I have downloaded Quicktime now 3 times and each time downloaded it again after first removing it from the control panel. Up to a few months ago I never had a problem and used it for many years as such. I think the problems started when the combinati

  • User exit for rerapp t-code

    Hello, i m looking for user exit for rerapp t-code but i couldnt find anything about that from internet. it s about e coming invoice. the invoice is being committed from rerapp t-code; then the view is being matched with invoice and clicked documents

  • Not a huge problem, but really annoying

    For some weird reason, certain albums in my library get sorted and displayed as five or six different albums on my iPod touch when in reality, it's just one album with a compilation of different artists (for example, the Spamalot soundtrack). I don't