Search Results

Search: Posts Made By: pcwiz
4,479
Posted By pcwiz
Its an external application. And you are right, I...
Its an external application. And you are right, I don't notice a hit in performance, so this should be OK :)

Thanks
7,533
Posted By pcwiz
Progress bar for cp
I'm trying to use this code to get a progress bar for cp:

"Can you get cp to give a progress bar like wget?" (http://chris-lamb.co.uk/2008/01/24/can-you-get-cp-to-give-a-progress-bar-like-wget/)...
4,479
Posted By pcwiz
Kill shell script when host program not running/disk unmounted
I have my Mac OS X program executing a shell script (a script that copies files to a drive). I want to make it so that the shell script automatically kills itself if it finds that the host .app is...
29,789
Posted By pcwiz
I'm using Mac OS X 10.6.1 with the standard bash...
I'm using Mac OS X 10.6.1 with the standard bash shell.

source_tree:
- Contents
-- Resources
---- English.lproj
---- French.lproj
---- German.lproj

destination_tree is an exact copy of the...
29,789
Posted By pcwiz
cp -Rp excluding certain files?
Hi,

I'm using cp -Rp to copy directories while preserving permissions. I want to exclude any ".lproj" files except for "English.lproj" and "en.lproj" from being copied, but the rest is copied as...
67,750
Posted By pcwiz
Get parent directory of a file
In shell how would I get the parent directory of a file. E.g. I feed this in:

/path/to/textfile.txt

And get just:

/path/to

Thanks
22,265
Posted By pcwiz
Hi, I used the kill utility and it seems to...
Hi,

I used the kill utility and it seems to work fine for my purposes :)

Thanks
22,265
Posted By pcwiz
I'm running Mac OS X, Darwin/BSD shell. I've...
I'm running Mac OS X, Darwin/BSD shell. I've written a native Mac OS X Cocoa application that launches a shell script. I need some sort of command that would be able to immediately kill the shell...
22,265
Posted By pcwiz
Hi, My script is just a simple shell script...
Hi,

My script is just a simple shell script that uses cp to copy some files:


#!/bin/sh
cp -R /somefile /newlocation/
cp -R /anotherfile /newlocation
# And so on for about 600 files

...
22,265
Posted By pcwiz
Killing a shell script
Hi,

If I have a large shell script running as root, say for example like one that copies a ton of files, how would I kill the shell script and any processes that it created?

Thanks
3,047
Posted By pcwiz
Exit shell after setting executable to run?
Hi,

I have an executable file that has a rather long and tedious process to complete. How would I launch the executable using the shell, and then exit the shell while leaving the executable to run...
9,855
Posted By pcwiz
Hi, Thanks for the answers @Fetus Hagen...
Hi,

Thanks for the answers

@Fetus Hagen

I checked out that thread and tried this command that was mentioned:

perl -e'printf "%o\n",(stat shift)[2] & 07777' FILENAME

The problem is I...
9,855
Posted By pcwiz
Command to return permissions in octal format
Is there any command that would return the permissions of a file or folder in octal format (e.g. 755, 644, etc.)

Thanks
12,924
Posted By pcwiz
Thanks for the reply, I tried that command but I...
Thanks for the reply, I tried that command but I still get the same errors.
12,924
Posted By pcwiz
Error with cp
I'm running OS X and I'm trying to use a simple cp command to copy a folder to another volume while preserving its permissions.

cp -Rp /bin /Volumes/NONAME/

And this is what I get:

cp:...
3,390
Posted By pcwiz
Get ownership info from LS
Hi,

When I do the ls-ld command for example like this:

# ls -ld /Applications

I get an output like this:

drwxrwxr-x+ 114 root admin 3876 18 Aug 14:04 /Applications

I need to somehow...
14,601
Posted By pcwiz
@avronius, I could probably use that method...
@avronius,

I could probably use that method and then make a shell script out of it. However, I was wondering if there was an easier way to get the permissions in plain number format rather than...
14,601
Posted By pcwiz
mkdir: copying a folder's permissions
Hi,

I wanted to know how to create a folder using mkdir and then have it copy the permissions from another specified folder on the system.

For example if I did this:

mkdir...
19,571
Posted By pcwiz
sed: deleting 5 lines after a specified pattern
As an example (just an example, this could apply to any block of text) say I have this:

architecture x86_64
cputype CPU_TYPE_X86_64
cpusubtype CPU_SUBTYPE_X86_64_ALL
offset 4096
size 2972420...
7,036
Posted By pcwiz
Using cp: preserving file/folder attributes and auto creating folders
Hi,

Is there a way to use cp in such a way that when a file is copied to a destination, the required destination folders are automatically created with the proper permissions, and the resulting...
3,014
Posted By pcwiz
Delete part of string
This command:

du -s /Applications/TextMate.app

Returns an output like this:

65792 /Applications/TextMate.app

I need to delete the space and the file path in the output leaving just the...
5,286
Posted By pcwiz
Thanks, just one problem. Now it returns an...
Thanks, just one problem. Now it returns an output like this:

/usr/lib/libcrypto.0.9.7.dylib
/System/Library/Frameworks/Cocoa.framework/A/Cocoa...
5,286
Posted By pcwiz
Thanks everyone. The above command returns an...
Thanks everyone. The above command returns an output similar to this:

/usr/lib/libcrypto.0.9.7.dylib
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa...
5,286
Posted By pcwiz
That worked brilliantly, thank you very much :)
That worked brilliantly, thank you very much :)
5,286
Posted By pcwiz
Deleting part of a string enclosed in brackets
I use otool on OS X to figure out the shared libraries that a binary uses. I run this command:

otool -L /Applications/Vidnik\ 0.13.0/Vidnik.app/Contents/MacOS/Vidnik

And it returns an output...
Showing results 1 to 25 of 34

 
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy