Solaris
   12 tags on

Solaris

  • All Sites

1 answer

What does “Invalid argument” mean in Solaris?

-bash-3.00$ ./p4 -V -bash: ./p4: Invalid argument What does "Invalid argument" mean in Unix? More details: p4 is an executable in the current directory. p4 actually refers to perforce. The option …

3 mins ago
1 answer

Objective-c: How to use NSPipe output the illegal command echo in a NSTask?

I have code like following, it's ok, but I have 2 question about it. 1) If I assign some illegal para to sh, for example @"ls - l", then the outString is null. That is to say, it can not capture the …

2 answers

Is it possibe to adopt a process?

Process A fork()s process B. Process A dies and therefore init adopts B. A watchdog creates process C. Is it somehow possible for C to adopt B from init? Update: Or would it even be possible to …

10 mins ago
1 answer

sed + removes all leading and trailing whitespace from end of each line on solaris system

I have Solaris machine – ( SunOSsmu1a 5.10 Generic_142900-15 sun 4vsparcSUNW,Netra-T2000 ) The following sed syntax removes all leading and trailing whitespace from end of each line , ( I need to ...

12 mins ago
10 answers

Maximum number of inodes in a directory?

Is there a maximum number of inodes in a single directory? I have a directory of 2 million+ files and can't get an the ls command to work against that directory. So now I'm wondering if I've ...

15 mins ago
1 answer

Http get ungzip response in bash

I need to manually ungzip response of the following page: http://muaban.net/ho-chi-minh.html I'm doing echo -e "GET /ho-chi-minh.html HTTP/1.1\r\nHost: muaban.net\r\nAccept-Encoding: gzip\r\n" | nc …

16 mins ago
2 answers

Cannot connect to beaglebone.local

I need to know how to connect to a beaglebone (or beagleboard) with SSH when I plug it into a new network with an ethernet cable like this: $ ssh root@beaglebone.local So far I've only been …

1 answer

Is it possible to choose whether to generate heap dump or not on the fly?

We have an application which is deployed to a WebSphere server running on UNIX, and we are experiencing two issues: a system hang which recovers after a few minutes - to investigate, we will need …

2 answers

iconv in Mac OS X 10.7.3 does nothing

I am trying to convert a php file (client.php) from utf-8 to iso-8859-1 and the following command does nothing on the file: iconv -f UTF-8 -t ISO-8859-1 client.php Upon execution the original …

58 mins ago
0 answers

How do I create a shell-extension / file container dll like winzip?

Ok so I need to make a file container program or namespace extension similar to that of winzip or winrar. Now I don't need the files to be compressed or encrypted or anything special like that. What …

2 answers

Swapping two files in shell

I'm trying to switch the contents of two files via temp file using the code; #!/bin/bash ... mv $FILE1 $TEMP mv $FILE2 $FILE1 mv $TEMP $FILE2 When I run this, it returns for each line number …

1 hour ago
1 answer

Converting a PIDL to file path with SHGetPathFromIDList

My application receives a PIDL as a string: QString pidl = "::{20D04FE1-3AEA-1069-A2D8-08002B30309B}"; In this case it corresponds to My Computer. I need to convert it to My Computer. Theres a ...

1 hour ago
1 answer

How to modify a bunch of text files with shell?

I want to add some text to a bunch of java files. They are scattered in lots of directories. I may write a java program to do this job. But I'm wondering if there are easier ways? I'm not sure if the …

1 hour ago
1 answer

Kill “loginwindow” process using command line in Mac OS X

So far, I have written the following unix command: ps -Ajc | grep loginwindow | cut -c 16-20 | sed 's/ //g' This grabs the "loginwindow" process, filters it using cut and sed to return the number …

1 hour ago
1 answer

What is an appropriate amount of light for a half barrel water garden?

I'm planning on building a water garden on my south facing deck. I plan on having water cover plants and fish. I also plan on having the barrel elevated a few centimeters to allow air flow. I'm ...

1 hour ago
2 answers

Shell: How to move all files but the last modified to another directory

How can I move all files in a directory except the one with the most recent modified time?

1 hour ago
0 answers

Version and Build Information Error Xcode 4

I'm using Xcode 4.3 and I have followed this user's steps to create the script: Version vs Build in XCode 4 For whatever reason it does not look like I can leave a comment there. As the answer area …

8 answers

Is it possible to detach a process from its terminal? (Or, “I should have used screen!”)

On Unix (specifically, Linux), I've started a job in a regular ssh->bash session. I'd like to leave work soon, but I now realize that the job is going to take several hours. If I had just started ...

2 hours ago
1 answer

How to fix the error on command “mysql -v”

Hi to all commandline/mysql experts, I am having a error when typing the comman "mysql -v" I got this: ERROR 2002 (HY000): Can't connect to local MySQL server through socket ...

6 answers

Get current working directory name in Bash Script

How would I get just the current working directory name in a bash script, or even better, just a terminal command. pwd gives the full path of the current working directory, e.g. '/opt/local/bin' but …

2 hours ago
4 answers

use rm to remove files and directories recursively

is it possible to use rm to remove files and directories matching a pattern recursively without using other commands?

2 hours ago
3 answers

Verifying type of data

I want to verify the type of data in output.txt. example: 52 40.5 60 yes 30.3 20 40 no result: 52 is Integer 40.5 is Decimal 60 is Integer Yes is Character What should be better to ...

2 hours ago
3 answers

Location of files on Unix whose file names and contents each match a regular expression

I want to search for file names with a regular expression, and grep it using regex. I tried this: find . -name co_on*eruo* | xargs grep '0LF2C Comdty(.*)20111022(.*)' But it doesn't work. What am …

2 hours ago
5 answers

Unable to delete directory

On my OS X host, I am having trouble deleting the directory "foo". mymac:.Trashes joe$ ls foo mymac:.Trashes joe$ ls foo/ Ảnh011.jpg Ảnh012.jpg Ảnh013.jpg mymac:.Trashes joe$ ls -l foo/ ls: ...

2 hours ago
0 answers

Programmatically adding files to the FileSystem in a .NET Install Project

The Problem: In have a process that builds our executable. Before running the build of the setup/deploy project, I build files that need to be included in the FileSystem/Common Documents Folder of the …

0 answers

Rate My CSV/DSV Parser Code and Presentation

This is my first AWK script. Rate my code listing (in this post) on a scale from 1-10, 1 being beginner, 10 being Masterful. Give an opinion on my presentation, and whether or not you think my …

2 hours ago
3 answers

read 05_16_2012 from BALASB_1234_05_16_2012:14:31:37.tar file name

I want to read 05_16_2012 from BALASB_1234_05_16_2012:14:31:37.tar file name using shell script. How can I do this?

2 hours ago
0 answers

poll implemenation on linux vs poll implementation on solaris

During debugging our application in linux enviroment we can observe that some events - POLLHUP|POLLIN occur only on linux. Our application uses unix sockets. When we do: ret = poll(xpoll->pfd, ...

2 hours ago
2 answers

removing new line character from incoming stream using sed

I am new to shell scripting and i am trying to remove new line character from each line using SED. this is what i have done so far : printf "{new\nto\nlinux}" | sed ':a;N;s/\n/ /g' removes only Ist …

3 hours ago
2 answers

Distributed cron

I maintain many servers and have the following requirements Run a unix process at a given time Run a unix process at boot time and keep it running (in case it dies) Disable a running process I am …

15 30 50 per page
1 2 3