script to set the path

Hi friends,

I need help if someone wrote the same type of script, please help me. My requirement is:

I have a folder structure in the unix box "/ 11 g/admin/soa_domain115/Server/soa_domain/servers/WLS_SOA1/logs / '. What I want when I log on to unix machine with my authentication of the user credentials and do sudo su - soaadmin and write to tail f WLS_SOA1.log, it should show me the output of the file WLS_SOA1.log.

WLS_SOA1.log file exceeds under the folder location that is ' / 11 g/admin/soa_domain115/Server/soa_domain/servers/WLS_SOA1/logs / '.

Thanks in advance.

He showed me out but when I "tail-f $WLS_SOA2" he invited this error message
tail: cannot open ' /11g/admin/soadomain/node1/mserver/soadomain/servers/WLS_SOA/logs/WLS_SOA2.log

It seems that you have made a typo, for example missing WLS_SOA2 in the path to the file.

For approach 2 Yes, I did with mytail option

Please present the command you type, including the error message.

How can I cancel it, then that when I login as sudo my way get to the location of a particular path.

Just change the file (vi ~/.bash_profile) and remove the CD command you added. Don't know what else I can tell you here.

Tags: Fusion Middleware

Similar Questions

  • Set the path system on Mac?

    I help with a plugin that uses some command line tools open source. The plugin comes with all the outbuildings grouped in a 'bin' directory, which works very well under Windows but Mac search the system path, when these programs are called. Mac users asked to install the files in/usr/bin, but now with "El Capitan", which is not possible. It also seems that the plugin cannot access anything installed in usr, even if it is in the system path.

    "El Capitan" even before we discussed ways for the Mac version to behave as the version of Windows and use the files installed in the 'bin' directory of.

        if MAC_ENV then
    
            local exportPath = 'export PATH="'
            local toolsPath = LrPathUtils.child(_PLUGIN.path, 'bin"')
            local systemPath = ':$PATH'
            local searchPath = exportPath..toolsPath..systemPath
    --        LrTasks.execute(searchPath) -- this doesn’t work

    The script calls this dependency checking:

    -- Check for Mac dependencies
    function MLProcess.checkDependencies()
        return "exec which dcraw exiftool"
    end

    The only way it will work on "El Capitan" is so dcraw and exiftool are installed in/usr/bin. Some users are skilled enough to disable the Protection of the integrity of the system to install the tools but that shouldn't be necessary. Another solution is to start Lightroom since a shell script which sets the path for this session before launching LR. Here is an example:

    LR.command

    export PATH="/Library/Application Support/Adobe/Lightroom/Modules/cr2hdr.lrplugin/bin":$PATH
    /Applications/Adobe\ Lightroom/Adobe\ Lightroom.app/Contents/MacOS/Adobe\ Lightroom

    Of course, these are just workaround solutions - how the system configurable path? Is it still possible?

    I found another way to do it without having to create a shell script. One of our programmers working on a lua module offered me an alternative. The script is a variable containing the call to invoke cr2hdr so that all the arguments of the command line for the path can be defined in the same variable. Here is the code:

    if MAC_ENV then
        command = 'export PATH="'..LrPathUtils.child(_PLUGIN.path, 'bin"')..':${PATH} && '..command
    end
    result = LrTasks.execute(command)
    

    These quotes which may appear irrelevant are important because the path names could include spaces.

    Either way, it's for an interesting project called magic lantern. It is a program that runs on some models of Canon cameras. The plugin should work with a feature called double ISO. Basically it allows you to make two ISO images in square brackets which is then integrated into an HDR file in post processing. The Lightroom plugin is a front end for command line tools that do the job.

  • Set the path preferred on a lun by naa ID or lun number

    I'm looking for a script to set the path for a lun or 2 at a time. I would like to by lun or naa id #.  the LUNS are rdm if this is important.

    I searched, and only scripts seen that the value all LUNS a hba for preferred path.   ESXi 4.1 if hosting is important

    Mike

    It's strange, that the cmdlet Get-ScsiLun takes an HBA from the pipeline object.

    You can get help for all Select-Object parameters with

    Get-Help Select-Object-parameter *.

    To get the 2nd object, you could do

    Select-Object - Index 1

    BTW you're on PowerCLI 5.0.1 now?

  • How to set the path of the report in a plugin for model

    I'm trying to figure out how to set the path of the report in a plugin process model. I can't find a way to have access to it. It seems this would be a reasonable thing to do since the plug-ins are for the treatment of the results. Does anyone know how to do this? We generally use the sequential process model, but I try to keep my plug-in as independent as possible.

    Thank you.

    If I understand correctly, you want your plug-in, when enabled, change the settings of all other instances of the report OR plugin as their reports share the same directory that your plug-in is configured to use.

    If so, your plug-in can access and change the settings of all other instances of plugin. All instances are passed to all the points of plugin entries in the subproperty of the plugins of the ModelConfiguration parameter table. You can browse this table. Any element of the array with an equal to "NI_ReportGenerator.seq" Base.SequenceFilename is an instance of the report OR plugin. Its report options are stored in the element under PluginSpecific.Options.

    You can change the report options to what you want. Note that the recall of the ReportOptions model is called from template-plugin Initialize entry point, then you might want to ensure that your changes are applied after that, so they are not replaced. To do this, you could make your changes in the Initialize entry point of your plugin and make sure your plugin runs last. To rotate the last, you can set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your file of plug-in with a value greater than 0, for example 1.0 (see Help for TestStand > Fundamentals > process template Architecture > plug-in for the model process Architecture > Structure of the plugin sequence files > plugin model of entry Points > Order Execution of Point of entry at run time).

  • Can I set the path in "Open TDMS" via a dialog instead of an explicit definition?

    I'm trying to access a file of PDM data with 'TDMS open', but I can't guarantee that it will always be in the same place.  I have code that does what I want with the data file, but I would really like a dialog box that will generate the path.  I would like to be able to navigate to the location of the file and when selected, set the path.

    I have seen this in other live (if the path is empty, it asks the file), but not here. Any thoughts on how to reproduce them here?

    In the o of file Express VI of dialogue > Advanced Files palette.

  • Set the path to the jar file

    Sorry for the noob question, but could you tell me please what I did wrong when I try to set the path to the file in my application jar.

    I have app that works with the xml file. I have the following project structure:

    /project_root_directory

    | / lib _

    | /resources/file.XML _

    | / SRC _

    So, I need set my jar file, because when I correctly by running the IDE, it works well.

    By default, it seems:

    private File file;
    private StreamResult streamResult;
    file = new File("resources/file.xml");
    streamResult = new StreamResult(file);
    
    
    
    

    And methods where I can change the DOM structure via transformer end methods:

    transformer.transform(source, streamResult);
    
    
    
    

    So, I tried sets the path to the file:

    private URL url;
    ...
    
    file = new File(url.getPath());
    streamResult = new StreamResult(file);
    
    
    
    

    But it does not, because when I try to get resources by the following condition

    url = getClass().getResource("resources/file.xml");
    
    
    
    

    (" url = getClass().getResource("resources/file.xml "); URL = getClass () .getResource ("url = getClass().getResource("resources/file.xml "); (" resources/file.xml ');

    URL - is null

    OK...

    I tried the following solution

    InputStream input = getClass().getResourceAsStream("resources/file.xml");

    Here, I myself also null...

    This solution I found here

    Also, I tried in absolute path

    filePath = file.getAbsolutePath();
    file = new File(filePath);
    streamResult = new StreamResult(file);
    
    
    
    

    But he also didn't work. There I got message seems to be: "Cannot find the /User/user1/Desktop/program1/resources/file.xml resource" - but it really is absoulte path to a file.

    Also, I tried using System.getProperty

    String filename = "file.xml";
    String workingDir = System.getProperty("user.dir");
    finalfile = workingDir + File.separator + "resources" + File.separator + filename;
    file = new File(finalfile);
    
    
    

    I also did test unit that finished with the 'green light', but potted his wrong with the message "unable to find /User/user1/Desktop/program1/resources/file.xm resource.

    Could you tell me please what I did wrong?

    file:\c:\Users\user1\Desktop\myapp.jar!\psswd.XML is what getResource() book you as the URL of the entry of the pot (notice I didn't say file, but the entrance of pot).

    The meaning is: the psswd.xml of the entrance lies at the root of the C:\Users\user1\Desktop\myapp.jar pot.

    Now, without taking into account my tips, you want to turn this into a file. If Java puts in front of it in the current directory. If you use Windows Explorer, you have such a file?

    psswd.XML is not just a file. In any case, given that your StreamResult is supposed to write something, it may not be in the jar. You can not write to an entry in the pot. Jars is supposed to be read-only.

    It's like an EXE file in writing within himself. So psswd.xml should be outside the pot, a real file and forget the things of the resource. It happened to work in the IDE, because there he was jarred not yet.

    It happened to be a Windows file and a Java resource.

  • How can I set the path for the layoff to Prem CC band?

    I have a new subscription to Prem CC and need to sack on DV tape.

    The settings I would like to import from tape and so the firewire connection is OK. The problem is, when I come to lay off the mounting tape, first disc recorder but the vision and sound aren't out to the recorder.

    In first CS5 there was formerly a section of playback settings as a drop down menu on the program monitor, but it's now just reading of resolution for the computer screen.

    Can someone tell me how to set the path to the drive?

    These images help?

    Jeff

  • Sets the path to the custom jar file

    Hello

    I have a jar (Blowfish.jar) custom file I put the path in classpath.bat in the IOM Java client. IOM is able to read the jar file and call the methods while creating users. All this are happening successfully in the windows environment.

    The same jar file I copied in the linux environment and set the path to the IOM java client (that we can not install on a linux machine). But when I create the user his throw
    InvocationTargetException.

    Where can I put the path to the jar file in linux environment to read this jar file.

    This is not at all related to ScheduleTask/JavaTask/ThirdParty records as it is a custom jar file.


    Thank you
    KK

    Why can't put this pot in ThirdParty folder?

    ldapbp is the external jar file that we put in third. I think it should work

  • How to set the path of journal report

    Hello

    How to set a path of journal report, code below will generate the report on the way to office, but I want to generate a journal report on where my indesign file is opened. We do this through script. Please help me

    It is for the opening of the file:

    var path = Folder.selectDialog ("Select folder");

    var file = path.getFiles ("*.indt" & & "*.indt").

    myDoc = app.open (new File (files));

    It is for the output file:

    var monFichierTexte = new File("~/Desktop/Log Report.csv")

    myTextFile.open ("w")

    myTextFile.write ("\nParagraph Style :")

    myTextFile.write (myMissingParaStyle)

    myTextFile.close ();

    by

    hasvi

    Hi Hasvi,

    Replace with: = path.getFiles var files (/ \.) (indd)? indt?) $/i );

    Kind regards

    Cognet

  • How can I use a script to set the variables?

    I have a script to set a few variables and I need to run the script multiple times throughout the form, for different users at different times.  How can I configure the script as an object in the Variables and call it when I need to run it?  Appreciate all help.  I use SS3.

    var emailSubject = "";
    var cleanDate = Page1.EventDetails.Block2.SpeakingDate.rawValue.replace(/[\/]/g, "-");
    var eventName = Page1.EventDetails.Block1.EventName.rawValue;
    var eventCity = Page1.EventDetails.USaddress.CityEvent.rawValue;
    var eventState = Page1.EventDetails.USaddress.StateEvent.rawValue;
    emailSubject = cleanDate + " - " + eventName + " - " + eventCity + " - " + eventState;
    

    To create a function to be able to reuse the code easily right click in your hierarchy (for example, on your "form1"), click "insert a Script object.

    A new script object will be created, just rename it to something appropriate and then create a function both inside and

    function myFunction(var1,var2,var3){
    ' just an example '
    page1.textfield1.rawValue = var1 + var2 + var3
    }
    

    (I didn't fully understand the significance of the date and the event and the city, and exactly what your function is supposed to do, but it's how you declare a function).

    To call this function you simply reference as form1.scriptobjectname.myFunction(123,"asdf",variablename)

    (just one example of the possible arguments).

    I hope that's not too hard to follow,

    Best regards, Mattias

  • Script to set the CPU and memory for VMS

    Hi all

    We have an environment with 100's of virtual machines. We have classified these VMs, and each category will have specific vMem and vCPU. Excel / csv spreadsheet has the list of virtual machines, as well as the values of vCPU and vMem. I'm looking for a script that can set the values of vCPU and vMem for virtual machines according to the directives of the excel sheet. If anyone can help with this?

    Thank you very much

    Try this.  I took the function of hotadd from here:

    http://ICT-freak.nl/2009/10/05/PowerCLI-EnableDisable-the-VM-hot-add-features/

    I tested against 1 VM and it works well.  It will make a loop and power all VM power off in parallel, then it will change all.  Then turn on all at the same time.  If you do not parallel you can change it.

    I would like to test in your lab or against 1-2 not prod the first VM.

    Same CSV colum

    VMNAME, MEM, CPU

    Function Enable-MemHotAdd($vm){    $vmview = Get-vm $vm | Get-View     $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    
        $extra = New-Object VMware.Vim.optionvalue    $extra.Key="mem.hotadd"    $extra.Value="true"    $vmConfigSpec.extraconfig += $extra
    
        $vmview.ReconfigVM($vmConfigSpec)}
    
    Function Enable-vCpuHotAdd($vm){    $vmview = Get-vm $vm | Get-View     $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    
        $extra = New-Object VMware.Vim.optionvalue    $extra.Key="vcpu.hotadd"    $extra.Value="true"    $vmConfigSpec.extraconfig += $extra
    
        $vmview.ReconfigVM($vmConfigSpec)}
    
    $vmlist = Import-CSV C:\csvfile.csv
    
    foreach ($item in $vmlist) {    $vmname = $item.vmname    Stop-VM -VM $vmname -RunAsync     }foreach ($item in $vmlist) {
    
        $vmname = $item.vmname    $cpu = $item.cpu    $mem = [int]$item.mem * 1024    Enable-MemHotAdd $vmname    Enable-vCpuHotAdd $vmname    Set-VM -VM $vmname -NumCpu $cpu -MemoryMB $mem -RunAsync -Confirm:$false
    
    }
    
    foreach ($item in $vmlist) {    $vmname = $item.vmname    Start-VM -VM $vmname -RunAsync     }
    
  • Script to set the static Mac address

    I have an Infrastructure virtual with about 200 vm with several vNIC and automatic Mac address. I need to assign static Mac for all NICs for and want to perform this operation with a powershell script and a csv input file. I have the entry csv file that looks like this: Vm, portgroup Mac Vm1 00:11:22:33 Vm1, pg1, pg2, 00:11:22:44 Vm2, pg1, 00:11:44:44 (I know the Mac above are not valid) can anyone help with the powershell code to automate the static configuration of mac?  Thanks in advance

    Hello, ITS.

    You should be able to use the following to achieve:

    ## import the info from the CSV$colNICInfo = Import-Csv c:\vmNICInfo.csv$colNICInfo | %{    $oSingleNICInfo = $_    ## get the VM, get its NetworkAdapters and for the one whose NetworkName matches that from the CSV, set its MAC address    Get-VM $oSingleNICInfo.VMName | Get-NetworkAdapter | ?{$_.NetworkName -eq $oSingleNICInfo.NetwkName} | Set-NetworkAdapter -MacAddress $oSingleNICInfo.MACAddr -Confirm:$false -WhatIf} ## end foreach-object
    

    A few things to note:

    • I left the '-WhatIf "parameter on the Set-NetworkAdapter portion, so that you can run this first (perhaps with a small sample of game in the CSV file) to check that things look like they will work.  Remove this parameter to set the MAC addresses
    • The code provides that the CSV of this format:
      MACAddr VMName, NetwkName,
      someVM, VLAN128, 00:50:56:00:00:0F
    • The cmdlet Set-NetworkAdapter requires the new MAC address in the range 00:50:56:00:00:00 - 00:50:56:3F:FF:FF.  It's not the range likely to use, VMware only a subset.  Seems to be a limitation of the cmdlet (probably intentional).

    Message edited by mattboren: added a note about removing "-WhatIf" to actually set the MAC addresses of the network adapters

  • How can I write a script to set the maximum pixel dimensions?

    I need lots of JPGs and limit the maximum size of 500 px. This must apply to the largest side of the image, either in height or width. The other side should auto size proportionally. I currently have to make these changes to size manually. I have not found any scripting language or function which will allow me to set the size of larger pixel to 500 px, no matter what size is the most important.

    Example:

    1. If the image is 1000 w x 750 px: px, I want the script to resize the image proportionally to the largest side, change the width to 500 px

    2. If the image is 750 px x 1000 px h w, I want the script to change the height to 500 px and proportions are consistent for the width

    All ideas are welcome grately.

    Thank you

    Linda

    Create an action that use file - automate - Fit Image.

    I think that there may always be a bug that this should fix...

    Mage http://www.PS-scripts.com/BB/viewtopic.php?f=10&t=3370&p=15152&Hilit=Don%27t+Enlarge+fit+i & sid = ea73e8349aaf965015a4a351340e865d #p15152

  • Questions to set the path of the image for the data merge in indesign

    Hello. I have problems to define the path to the image properly to merge images into my document. The data merges correctly, then not issued with the source file, but the images will not bind. Have tried serval variables: for example including with and without the "Machintoch HD" root directory path and "/" and with ":" and with the name of folder only. A copy path directly from indesign links Panel. At a loss. Am I missing something simply or is it too complicated?

    can any help?

    No problem! I was almost afraid to ask because it seemed too obvious! I'm so glad I did... Please mark it as "Answered."

  • script to set the default paths to RR

    I'm new to powershell and I write (for most, copy and paste) a script to make an initial config on esxi 4.1.  I am looking to configure multiple paths default to RR.  So far I have seen examples of how to put it on Lun already attached to the host.

    Thank you

    I see. To set default multi-channel management strategy, you can use the Get-EsxCli cmdlet.

    See Arnim ESXCLI PowerCLI how post.

Maybe you are looking for

  • Change the search engine to the url of the specific Web site

    I have the problem by changing the url of search engine for the url address bar and the search engine plugin. My version of Firefox is 35. Specifically, I want to use Google.co.uk for each search, but it goes to a country different from Google. I tri

  • Password BIOS reset

    I am looking for factory reset my laptop, but don't remember the BIOS password. Model: F2P34UT #ABA Series: [personal information] Any help would be appreciated.

  • myIpAddress() returns IPv6 address in Firefox 4 proxy.pac file

    I have a proxy.pac file that works very well with IE9 and Chrome in Windows 7 that selects a proxy based on myIpAddress(). It did not work in Firefox 4 and it turns out that myIpAddress() amounted to the IPv6 address of the computer, instead of the I

  • Stop posting MPA Library choice who use the bus system?

    Hello How can I stop the choice of the library for the 'Guitar' tracks to show patches that use the bus? (I have a strict methodology for the use of bus). Thank you very much! G [I am a professional producer, at the level of experts, working in execu

  • IdeaPad 13: Touch not working not not after connecting USB device

    Hi - I use a USB MIDI keyboard (Akai LPK25) with my Ideapad. I have not previously had a problem with this configuration, but since about a week there, as soon as I plug the device touchscreen becomes invalid. Remove the device is not restore functio