This might not the best method but I used the Log show command to access the unified logs.
And then directed this to a file. So I use this to monitor the camera status.
Hi All,
I have an expression as follows:-
a=`expr ${i} + ${j}` >> $log_file 2>&1
Here, if any of the values i or j or both happens to be empty then the "expr" returns error as
"expr: 0402-050 Syntax error." My problem is I am not able to re-direct this error to the log file. Its is getting... (4 Replies)
Hi,
I have a script to compare 2 files.
file1=$1
file2=$2
num_of_records_file1=`awk ' END { print NR } ' $file1`
num_of_records_file2=`awk ' END { print NR } ' $file2`
i=1
while
do
sed -n "$i"p $file1 > file1_temp
sed -n "$i"p $file2 > file2_temp
diff file1_temp... (5 Replies)
Hi there,
We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default?
Essentially, I'm hoping to replicate Get Info > Open With > Change All using a shell script, but I just... (0 Replies)
Hello, currently we are executing a .sh from terminal.
The current .sh looks like this:
#!/usr/bin/env bash
/Users/user/my.app/Contents/MacOS/my &
--
Now, we also need to run a third line in the .sh - It's a command line application that I need to run when I execute the above .sh... (0 Replies)
#!/bin/ksh -x
cd /tmp/tj
ftp -n servername.com << DONE
user username password
as
put test.log
quit
close
DONE
echo "testing..."
sh -x scriptname, and it shows all, but username, as, put, quit, close, DONE.
how can i see those ? (1 Reply)
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
What is the best practice to allow a 3rd party health monitoring app to read the messages file. Since messages is a system file and is owned by root the app cannot read the file. I don't want to run the app as root so how should I allow the app to read the file. The read function is actually built... (2 Replies)
Discussion started by: slwiley
2 Replies
LEARN ABOUT MOJAVE
tmdiagnose
TMDIAGNOSE(8) BSD System Manager's Manual TMDIAGNOSE(8)NAME
tmdiagnose -- gather information to aid in diagnosing Time Machine issues
SYNOPSIS
tmdiagnose -h
tmdiagnose [-d seconds] [-f path] [-m] [-r]
DESCRIPTION
The tmdiagnose tool gathers system and backup information in order to assist Apple when investigating issues related to Time Machine. A great
deal of information is harvested, spanning system state, system and backup configuration, and snapshot details.
What tmdiagnose Collects:
o A spindump of the system
o Several seconds of fs_usage ouput
o Several seconds of top output
o Individual samples of backupd and Finder
o Power Management state and logs
o IOKit registry information
o A netstat inspection
o A list of all open files on the system
o All system logs
o All kernel logs
o All install logs
o All fsck_hfs logs
o All WiFi logs
o Disk Utility logs for all local users
o The system migration log
o All spin and crash reports for the following processes:
backupd
mds
diskimages-helper
DesktopServicesHelper
newfs_hfs
NetAuthSysAgent
o Recent spin and crash reports for the following processes, for all local users:
Finder
Locum
System Preferences
SystemUIServer
iPhoto
Mail
MailTimeMachineHelper
Address Book
o Basic information about reachable AirPort and Time Capsule devices
o The FindSystemFiles cache
o Information about disks and mounted network shares
o Information about attached disk images
o A System Profiler report
o A list of software that has been installed via the darwinup tool
o Time Machine preferences, caches, and configuration information
o Comprehensive information about Time Machine backups and snapshots
The high-level backup structure for the current machine directory is recreated inside the diagnostic bundle, including the capture of various
Time Machine log files contained within snapshots. Items in this "skeleton" structure have on them the extended attributes of the originals.
Recreations of local snapshots are also captured in the same manner.
The tmdiagnose tool will run the Spotlight diagnostic tool mddiagnose automatically, if it is available.
What tmdiagnose Doesn't Collect:
o No user files are harvested from within backups
o No authentication credentials are harvested from the system
o No authentication credentials are harvested for reachable AirPort and Time Capsule devices
OPTIONS -h Print full usage.
-d sec Delay the start of the diagnostic by sec seconds. The system alert sound will play two times when the diagnostic begins.
-f path Write the diagnostic to the specified path.
-m Gather memory diagnostics for backupd and Finder.
-r Do not reveal the diagnostic in Finder when finished.
EXIT STATUS
tmdiagnose exits with status 0 if there were no internal errors encountered during the diagnostic, or >0 when an error unrelated to external
state occurs or unusable input is provided by the user.
Mac OS X 6 September 2011 Mac OS X