-
All Sites solaris unix sunos zfs ksh shell sun solaris-10 solaris10 sunsolaris10 awk filesystems
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 …
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 …
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 …
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 ...
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 ...
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 …
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 …
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 …
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 …
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 …
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 …
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 ...
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 …
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 …
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 ...
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?
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 …
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 ...
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 ...
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 …
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?
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 ...
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 …
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: ...
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 …
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 …
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?
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, ...
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 …
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 …