Oracle linux disk and folder shell script

Hi,
Shell script that shows you how to disk , folder.

user8053012 wrote:
du -sh /data/oracle/ |sort -r -n |head -20 how to write shell script ..Are you asking how to write a shell script that will execute the command 'du -sh /data/oracle/ |sort -r -n |head -20'?
If so, just use vi to create a new file, and put the command into the file. After saving the file, be sure to use 'chmod' to make it executable.
If that's NOT what you are asking, then your second post is just as obscure as your first.

Similar Messages

  • Need last [login, access, bind] time plugin and/or shell script

    Hi Gurus,
    I was wondering if anyone could share their pre-op bind plugin (and/or shell script) to store the last access time. We have a heterogeneous UNIX environment (Solaris, HP-UX, and Linux clients and Sun JES DS 5.2 on Solaris 9 as name service repository) and need to implement account suspension if the user has not logged in in the specified period.
    Thanks.

    Thanks for the reply, I've updated my OP with proper code tags.
    The g13 is a gaming keyboard https://wiki.archlinux.org/index.php/Logitech_G13
    I'm attempting to use the 'g13' outlined section
    I will look into udev rules, thanks again.

  • PLSQL job and unix shell scripting

    I want to be a plsql developer, now reading job ads for the technical requirement.
    This is a typical plsql job ad:
    "Technically those applying MUST have a minimum 5 years Oracle PL/SQL design and development experience combined with 3 years Informatica/ ETL exposure. You should be comfortable working off Unix platforms and associated *Shell Scripting* and database performance tuning. Experience with vendor products surrounding the compliance area such as Mantas or Actimize is highly beneficial. "
    Generally, do plsql developers work with shell scripting on a basic level, like echoing, saving files, looping etc, well, this level? : Unix Programming for dummies [http://www.amazon.com/Programming-Dummies-James-Edward-Keogh/dp/0764500619|http://www.amazon.com/Programming-Dummies-James-Edward-Keogh/dp/0764500619] . Er...this kind of of shell programming is very easy, why bother even putting the requirement in the ad? It's like saying you need to know primary school maths for the job.
    Or plsql developers work with unix programming at this kernel programming level, like semaphores, signal, UNIX Systems Programming: Communication, Concurrency and Threads? [http://www.amazon.com/UNIX-Systems-Programming-Communication-Concurrency/dp/0130424110/ref=sr_1_6?ie=UTF8&s=books&qid=1256350650&sr=1-6|http://www.amazon.com/UNIX-Systems-Programming-Communication-Concurrency/dp/0130424110/ref=sr_1_6?ie=UTF8&s=books&qid=1256350650&sr=1-6]
    I got plsql and sql tuning requirement under control, now need your help to know what level of expertise is required for unix shell scripting. What plsql developers generally do with unix shell scripting? Can you recommend a book to read?
    Many advance thanks.

    Generally, do plsql developers work with shell scripting on a basic level, like echoing, saving files, looping etcYes.
    Or plsql developers work with unix programming at this kernel programming level, like semaphores, signal, UNIX Systems Programming: Communication, Concurrency and Threads? Generally speaking, No.

  • Oracle 11g R1 Automatic Installation shell scripts

    Hy Guys,
    Please can someone help me with: Oracle 11g R1 Automatic Installation shell scripts. A guide, how to or a link will be wellcome
    Kind Regards
    Easyman
    Edited by: Easyman on Feb 2, 2010 3:58 AM

    Hi Easyman,
    sure, just have a look in $INSTALL_CONF directory. Files starting with swInst* are referencing a response file from $INSTALL_CONF/response directory. Either use a sample configuration file or add your own response file to install Oracle.
    Cheers,
    David
    OCP 9i / 10g / 11g
    http://www.oratoolkit.ch/knowledge/howto/installation/otn.php
    P.S.: If you have more questions about oraToolKit please contact me at: http://www.oratoolkit.ch/faq.php

  • Oracle Linux 6 and Oracle DB for ERP System

    All,
    I have a few questions about using Oracle Linux 6 and the Oracle Database for our ERP Server. We are using a System that run off of Appache httpd and Tomcat and connects to an Oracle Database. We currently are running as a hardware installed server, with Oracle Linux 5 and 10gR2. We are looking to migrate to a Virtual environment as we run VMWare for all our other Servers and services. I have started the install of a development/test system. I wanted to install Oracle Enterprise Linux 6 x86_64 along with either 10gR2 or 11gR2. I noticed that 10gR2 was not certified on OEL6 hence why the thought of moving to 11gR2. The one issue I have is the ERP system is not a x86_64 system is there any way of running 32 bit apps on a 64bit OEL install? I would need to compile a few small 32bit C code programs so would need 32bit libs to compile against. Any support would be greatly appreciated. I know that OEL has an i386 install but I also know that the x86_64 has more support for Oracle DB.
    P.S.
    Our ERP System is programmed via a small company that does not certify anything. They have taken the approach if it works it works (not happy with this but it is what it is). So the main issue is I need to get Appache Httpd, Tomcat running along with ability to compile a few small 32bit apps.
    Edited by: Rever75 on May 7, 2012 1:45 PM

    x86-64 is an extension of the x86 32-bit CISC instruction set. The 64-bit extension provides support for long mode to address larger virtual and physical address spaces.
    You can generally run 32-bit applications on a x86_64 bit CPU and a x86_64 kernel, provided you have the appropriate i386 libraries installed. When you install Oracle 11gR2 11.2.0.1 for x86_64, appropriate i386 libraries are a prerequisite.
    Since x86 on a x86_64 CPU is still hardware, there will be no performance penalty to run 32-bit application. Btw, you cannot run 64-bit applications using a i386 kernel. The only exception I know is Mac OS X.

  • Beta Testing Begins for New "Oracle Linux 5 and 6 System Administrator" (OCA) Certification Exam (1Z1-100)

    Oracle Certification begins beta testing this week for the new upcoming certification - Oracle Certified Associate, Oracle Linux 5 and 6 System Administrator. READ MORE

    We do have things in the works but cannot be announced prematurely. We'll put the word out on the [Oracle Certification Blog|http://blogs.oracle.com/certification/] as soon as possible.
    Cheers,
    - Harold

  • Get all .pdf file in a folder and do shell script

    Hi, I need to convert many pdf to ps using pdf2ps, and I'm try to do this with applescript:
    tell application "Finder"
    set pdf_folder to (choose folder)
    set pdf_path to POSIX path of (item of folder pdf_folder whose name...)
    end tell
    repeat with k in pdf_path
    set kl to ... -- same of k but with extension .ps
    do shell script ("pdf2ps "&k&" "&kl)
    end repeat
    but I don't know how implement that.
    Can anyone help me?
    Thanks!

    01. The 'tell application "Finder" ... end tell' code block is not required to call 'choose folder'. View the 'Standard Additions' dirctionary.
    02. 'choose folder' returns a single alias - if only a single folder is to be selected, or a list of 'alias'es - if 'multiple selection allowed' is set to true.
    03. 'pdf2ps' is not part of Apples' UNIX commands installation; and you did not provide a valid URL for others to download the UNIX command.
    Code to process only a single selected folder.
    -- Code starts here --
    try
    do shell script ("pdf2ps " & (quoted form of (POSIX path of ((choose folder) as string))))
    end try
    -- Code ends here --
    Code to process multiple selected folders.
    -- Code starts here --
    set pFolder to choose folder with multiple selections allowed
    if ((count pFolder) > 1) then
    set {oAStid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ""}
    set pFolder to text items of pFolder
    repeat with i from 1 to (count pFolder)
    set (item i of pFolder) to quoted form of (POSIX path of (item i of pFolder))
    end repeat
    set AppleScript's text item delimiters to " "
    set pFolder to pFolder as string
    set AppleScript's text item delimiters to oAStid
    else
    set pFolder to pFolder as string
    end if
    try
    do shell script ("pdf2ps " & pFolder)
    end
    -- Code ends here --

  • Oracle 10g and Korn Shell Scripting

    I have a table,SALES_STAGING, with 3 main columns.
    Sales_Date, Sales_type,Sales_Code.
    A sale is added to the table then waits until approved to be processed. The Sales_Code is 1(waiting approval). Then manually changed to 2 every 30 minutes by sales staff except on weekends. By Monday,a large queue develops. This must be changed because the queue is slowing the system. Can someone help create a Unix Korn shell script to
    1) Run every 30 minutes via Crontab
    2)login to the Oracle DB.
    3)Count the number of records to be processed, if any.
    4)Update another 'log' table with the time it ran and the records to be processed
    5)if there are less than 20 add another 50 to be processed by changing the Sales_Code from 1 to 2.
    This would really help out tremendously! Thank you.

    Wait... Isn't this forum designed for the sharing of information? The experts here shouldn't be concerned whether the request is from a Student, Oracle newbie or Developer and should focus on the request. If you are capable of assisting then I am hoping you will out of the core respect for professionalism and the motivation to provide something of value to others. If not, don't waste my time or any one else by responding with preconceived judgments and insulting remarks as these will be reported.
    Sales transactions can peak at 20,000 per hour with an average of several million thru the week. Those sales by VIP customers are immediately identified and have a priority for approvals because their balances can easily exceed $1,000,000.00. There is a pre-approval process to be introduced but until programs can be modified/tested and deployed we need a quick fix. The programming system isn't slow, it's the limited human resources approving VIP customers. My request was to keep it simple and expand on it myself to include the entire scope of our project. dbms_scheduler, although a good idea will require DBA assistance and there is no resource available. I need a simple working model to give me some direction/ideas...

  • Oracle Workflow Erroring on Function/Shell Script

    We are in the process of upgrading databases and reimported all the OWB code into the new database.
    Currently our OWB mappings all seem to run ok, but when I try to run a process flow I am hitting the following error
    RPE--2075: Oracle Workflow failed to process the execution request for activity LD_EDW_MAIN:F_GET_DB_NAME. This may be because dependant objects have not yet been deployed. ORA-20010
    F_GET_DB_NAME is a function and I checked and I see that the function executes properly
    I also hit a similar error when trying to execute a shell script.
    How would I go about deploying a function or a shell script?
    Im relatively new to OWB and am being "force fed" learning since we lost our main OWB colleague.
    Thank you

    Thanks! for your reply.
    I am using this API outside the workflow.I am using this API for iExpense to approve an Expense Report. In Expenses Workflow below are the processes:
    1. AP_MANAGER_APPROVALPROCESS whihc is using NON_AME_APPROVAL_PROCESS and this is using REQUEST_APPROVAL_PROCESS and under this process there is a notification APPROVAL_REQUES. Now, I am completing this ACTIVITY as Approve and I am able to do that but problem is that REQUEST_APPROVAL__PROCESS is itself not getting completed and stuck here.
    Please let me know how can I achieve that.
    Thansks!
    Sandy

  • Oracle spatial, disks and partitions...

    Can anyone point me in the direction of some kind of documentation with regards to recommended disk and partition configurations for Oracle Spatial? I'm running Red Hat Enterprise Linux and Oracle 10g. With the recent advances in technology in terms of disk speeds, etc, is there any benefit in splitting the OS, programs, data, indexes, and logs onto separate physical disks, or can I get away with having them on different partitions on the same disk?

    Despite the similarity in spelling, spatial ain't that special - its just one of many datatypes that Oracle provides.
    I may be wrong, but I wouldn't think there any particular guidelines or recommendations for configuring a database that will contain spatial database as apposed to one that will not.
    I suggest you follow general guidelines from the Oracle administrators guide about configuring a database for a particular use - ie. you would configure a OLTP database different to a data warehouse. In particular read the administrators guide and installation guide for your particular operating system.

  • Automator and "Run Shell Script" error

    First, if I'm in the wrong place with this- sorry. Figured this was an OS kind-of thing.
    I recently migrated to a new iMac ... I brought along an Automator script; I've been using it for years to perform a little rsync backup to an USB HDD. It's 'never' given me any problems ... until now!
    "*Run Shell Script*" encountered an error .. but alas, the system log is devoid of messages ... and the verbose log I have running indicates that all the files are copied/backed-up ... I would love any input on this that might help me get back on the feet. .....
    *Here's what my Shell Script Looks like:*
    Shell Option: /bin/bash
    Pass Input: to stdin
    rm -dfr '/Volumes/Backup HD/*********'
    rm -dfr '/Users/***********/Library/Logs/Profile_Backup.log'
    rsync -rltv /Users/******** '/Volumes/Backup HD/' > /Users/*******/Library/Logs/Profile_Backup.log
    (I'm sure there's way to only sync the changed stuff between backups ... but I've simply preferred the fresh copy approach).
    *I do however note this in my logs when I open Automator:*
    12/14/10 3:15:46 PM [0x0-0x42042].com.apple.automator.Backup[464] Application Stub: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

    @Tony T1
    Thanks, I'll certainly adjust the log file as suggested
    In troubleshooting the problem I went the terminal route - and issued each command ... during the rsync process I was getting an error ... turns out when it was syncing the SyncServices folder it was encountering a copy of the keychain ... which had root permissions - naturally rsync was not able to copy the file (personally I have no idea why the keychain would be being sync'd with anything)!
    I removed the file from the sync ... I'm still doing some "debugging" to correct the problem-
    Again, thanks for the assist!

  • UNIX path AND  Do shell script path with spaces

    I am trying to building a interface with buttons to execute shell commands when the button is pressed. Below press button execute code.
    I am new to AppleScript and Xcode and Interface builder. I have read different post referencing spaces but I still don't understand.
    THIS COMMAND DOESN'T WORK IT'S SOMETHING TO DO WITH SPACES.
    How would I fix this to work.
    on clicked theObject
    do shell script "rm /Library/Preferences/com.netopia.netOctopus\ Agent.preferences"
    end clicked
    This works (Below) no spaces in the path
    on clicked theObject
    do shell script "open /System/Library/PreferencePanes/SharingPref.prefPane/"
    end clicked
    ALL Mac OS X (10.4.6)
    ALL   Mac OS X (10.4.6)  
    ALL   Mac OS X (10.4.6)  
    ALL   Mac OS X (10.4.6)  
    ALL   Mac OS X (10.4.6)  
    ALL   Mac OS X (10.4.6)  
    ALL   Mac OS X (10.4.6)  
    ALL   Mac OS X (10.4.8)  
    ALL   Mac OS X (10.4.8)  

    Camelot's explanation was good, but you don't seem to get it, so I'll take a crack at explaining as well.
    First off, you need to understand what "do shell script" does and does not do. "do shell script" takes a string from AppleScript and passes it to a shell interpreter. It does not check in advance that this string makes sense. (That is impossible to do, in fact.) It just passes it along. The shell interpreter then converts the string into a command, or series of commands, and attempts to run them.
    In AppleScript, quotation marks around something make that something a string. So, for example:
    "rm "
    is a string containing a letter r, a letter m, and then a space. Some commands can also return a string, which can then be stored in a named variable, as for example:
    set a_variable to (the text returned of display dialog "Hi!" default answer "Some text")
    When you wish to put two strings together in AppleScript, you use the & operator, as in:
    "String 1" & "String 2"
    In this example, there is no space at the end of the first string, and none at the beginning of the second, so the result is:
    "String 1String 2"
    All clear so far?
    When a shell interpreter attempts to convert a string into commands, it has to split the string into pieces. A space signifies a break between pieces. In order to put a space into a single item, you can do a number of things. You can put the whole item in quotation marks (single or double), which is known as "quoting":
    '/A/Path/With/A Space'
    or you can put a backslash before the space, which is known as "escaping":
    /A/Path/With/A\ Space
    You can combine quoting and escaping if you do it right. For example, the backslash also lets you use a quotation mark inside a single item which is quoted:
    "/A/Path/With/A Space/And/A\"Quotation/Mark"
    There are further rules and substitutions that sometimes border on the arcane.
    In order to simplify things, Apple created the command "the quoted form of". This command takes a string and returns a new string which is properly set up so that it will be just one item when split up for the command line. It will add quotation marks, backslashes, or whatever.
    So, to put things together:
    "rm " & the quoted form of thePath
    is a way of saying to AppleScript "take the string in the variable named thePath, and quote it for the command line; then stick it on the end of a string containing an r, an m, and a space."
    When you pass this to "do shell script", it will break things up in such a way that it hands thePath to the rm command, which will attempt to remove whatever is represented by thePath. (Adding the "-r" in there just tells the rm command "if this is a directory, get rid of it and all its contents". Otherwise rm will complain if the item is a directory.)
    I think, however, you may just have the path wrong. In one of the spots where you gave the POSIX path, it had a backslash (\) at the end instead of a forward slash (/). As Camelot says, a forward slash means that the item is a directory and not a plain file. But if you really meant the backslash, it suggests that the item is a plain file, but has a space at the end (or some other character that mystifies the command line). It's an escape.
    Try making a new script in Script Editor which says
    ">" & (the POSIX path of (choose file)) & "<" at the end, that's the culprit.
    (And if it won't let you select the file when you run the script, it means that the item is actually a folder.)

  • Wireless network (and a shell script for you guys, also)

    I don't know the right way to bring up my wireless iface at bootup, so I wrote a small shell script to do it for me.
    Feel free to use it if you find it useful..
    I'd also appreciate someone telling me what *IS* the arch way of doing what my shell script's doing
    #!/usr/bin/env bash
    # Val Polyakov <[email protected]>
    # 7/8/07
    # Change these to reflect your network
    PATH=/usr/sbin:/sbin:/bin
    IFACE=ifaceNameOfYourWirelessCard
    DRIVER=moduleNameForYourWirelessCard
    SID=yourSID
    ENCKEY=yourEncryptionKey
    # Don't change anything beyond this point.
    case "$1" in
        start)
            echo "Loading the wireless card driver"
            modprobe $DRIVER
        echo "Setting up the SID and encryption key"
            iwconfig $IFACE essid $SID enc $ENCKEY
        echo "Bringing up the wireless interface"
        ifconfig $IFACE up
        if [ -f /var/run/dhcpcd-$IFACE.pid ]
        then
            rm /var/run/dhcpcd-$IFACE.pid
        fi
        echo "Running the dhcp client"
        dhcpcd $IFACE
        stop)
            echo "Bringing down the wireless interface"
        ifconfig $IFACE down
        echo "Unloading the driver"
        rmmod $DRIVER   
        restart)
            $0 stop
        sleep 2
            $0 start
            echo "usage: $0 {start|stop|restart}"
    esac
    exit 0

    brain0 wrote:If your wireless drivers support wpa_supplicant, you could try autowifi from http://www.archlinux.org/~thomas/autowifi-svn/ It handles multiple wireless networks very well. There is no documentation right now, just read here: http://archlinux.org/pipermail/arch-dev … 00867.html
    what would the benefit of that be, as compared to my script ?
    the shell script i made (and pasted) works just fine, sits in /etc/rc.d and is called by /etc/rc.conf
    i was just curious whats the official, i guess, way to do it with arch
    since network profiles dont work for some reason, i figured i must be missing something..

  • New installation woes - SQLDeveloper on Oracle Linux x64 and Oracle 11g XE

    Note that as an experienced Oracle developer in enterprise environments running MS Windows OS, I am familiar with SQLDeveloper for Windows. I don't have a lot of experience with Linux however. I don't find it intimidating, I just don't have a lot of accumulated knowledge.
    I have recently been trying to set up a development environment on my Windows7 Professional x64 laptop.
    1. Installed Oracle VBox
    2. Installed Oracle Linux 5.2 inside the VBox (because Oracle 11g XE is not certified on 64 bit Windows, needed to go with a Linux OS)
    3. Installed Oracle DB 11.2 XE
    4. Installed JDK as instructed in the SQLDeveloper release notes for Linux x64
    5. Installed SQLDeveloper 3.1.07.42-1
    No apparent issues with any of the installations.
    Problem : I can run SQL Plus from the command line, but when I click on the icon for SQLDeveloper, nothing happens. No error messages, nothing else.
    Question #1 : Unsure how to debug/troubleshoot this. Will read through the installation and release notes for SQLDeveloper, but any suggestions would be welcome.
    Question #2 : Could this be due to an issue with the JDK installation? It appeared to be successful (no obvious issues) but I can't see anything in the Oracle Linux menu system that tells me the JDK was installed successfully. How can I confirm that the JDK installation was successful?
    Edited by: Peter Hartgerink on Jun 19, 2012 9:12 AM

    >
    The Linux x64 version of SQLDeveloper doesn't come bundled with JDK. There is a version of JDK recommended, with an advisory to install it before installing SQLDeveloper. This I did, with apparent success. I guess I'll have to install the JDK again and check my Java versions afterwards. Thanks.
    >
    I don't know what JDK you downloaded since you didn't say. What version was it? Post the link.
    I find it hard to believe that the JDK version recommended was 1.4.2 since that is an ANCIENT version of Java, you have to hunt to even find it for download and most importantly the sql developer main download page clearly announces what version of Java is needed.
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
    >
    JDK Support
    Oracle SQL Developer 3.1 is shipped with JDK1.6.0_11. However, you can connect to and use any JDK 1.6.0_11 or above. To use an existing JDK, download the zip files listed below "with JDK already installed."
    >
    As you can see you need JDK 1.6.0_11 or above.
    If the version you say was recommended was actually 1.4.2 then that is an error; post the details so the developers can get that error fixed.
    I don't know what is on your system and can only go by the information you provide
    >
    4. Installed JDK as instructed in the SQLDeveloper release notes for Linux x64
    java version "1.4.2"
    >
    You either downloaded version 1.4.2, which seems unlikely, or your Linux included 1.4.2 and it is being used when you try to launch sql developer.
    Perhaps your system now has multiple versions of Java on it but the version being used by sql developer is the wrong one. If so that is the issue you need to resolve.

  • Host in forms 10g and execute shell script

    Hi!
    I have a little problem. When I transfer form to AS through SSH protocol I want to automatically generate form on AS wit h code:
    declare
    lv_server_dir vc2() := /folder1/folder2;
    lv_file_name vc2():= a.fmb;
    host(lv_server_dir||'/ftp_gen.sh '||lv_server_dir||' '||lv_file_name);
    In file ftp_gen.sh is code:
    export ORACLE_HOME=myOracleHome
    export PATH=$PATH:$ORACLE_HOME/bin
    export TNS_ADMIN=$ORACLE_HOME/network/admin
    export SQLPATH=$ORACLE_HOME/dbs
    export NLS_LANG=SLOVENIAN_SLOVENIA.EE8ISO8859P2
    export DISPLAY=:2
    cd $1
    ./gen.sh $3
    When I execute this command on form nothing happens.
    What could be wrong?
    Thanx,
    Bojan

    Hi Bojan,
    Executing the HOST Command will execute in the Mid Tier and nothing will show up in the Client. (other than the form go into Blocking mode). Just check out whether the Operation you wanted to do in the Mid tier is done or not. (Here it looks like you are compiling a form. So, check out that the fmx is generated.)
    Alternatively to check out the proper execution of the HOST command, you can generate a file in the Mid-tier (on successful execution of the shell script) and read the file using TEXT_IO and display a message to user.
    HTH.

Maybe you are looking for

  • New replacement Ipod not recognized by Cpu or Itunes

    I just got a replacement Ipod, charged it fully, reinstalled all the software, but my cpu still doesn't recognize it. Is there anything I can do?

  • Solid Orange Light When Charging, Yet Ipod Broken?

    So, at some point in the past I walked into the ocean with my IPod shuffle. Yes, stupid move, I know. Anyway, it still worked for a little while afterward, and I got a new IPod, which got stolen. So, recently I've been trying to get this IPod Shuffle

  • CALL FUNCTION 'RFC_REMOTE_PIPE' throwing exception as 1

    Hi Sapients, I am using CALL FUNCTION 'RFC_REMOTE_PIPE' to rename a file at the UNIX level..Though this runs well... sometimes this is giving an exception as ''1'' (System Failure).. if we execute the same after 3  or 4 hours this RFC is again succes

  • My iPad Air wi-fi has been stolen.

    Hello Apple lovers, My iPad Air Wi-fi has been stolen. I have only the serial number. My question is: is there possibility to get the IMEI number if you know only the serial number? Thanks in advance dears...

  • Where does the second page of PREVIEW CONTRACT come from?

    I am using 11.5.10.2, and I would like to know where the second page of PDF output comes from when I select PREVIEW CONTRACT from the VIEW CONRACT TERMS window. It does not appear to be part of the layout template named "PO Terms and Conditions". It