Tag Info

New answers tagged

0

You can install ImageMagick and use the identify tool with -verbose, for example: for f in *.jpg *.jpeg *.JPG *.JPEG *.mp4 *.MP4; do echo $f identify -verbose "$f"|grep exif:DateTime echo done Kepler22b-artwork.jpg Kepler-62f_with_62e_as_Morning_Star.jpg exif:DateTime: 2013:04:08 10:45:44 logo.jpg P1050030.JPG exif:DateTime: 2013:11:01 ...


0

Recent versions of Mac OS X now include xinetd by default, e.g. see: http://support.apple.com/kb/TA20863?viewlocale=en_US


0

Using the --eas option when running the install.sh worked like a charm for me!


0

Since Finder is built in objective-c it uses nib localizations. Here is an example. /System/Library/CoreServices/Finder.app/Contents/Resources/sv.lproj/ServicesMenu.strings sv.lproj stands for Svenska.localized project Here is the contents of ServicesMenu.strings bplist00”[Finder/Open]Finder/Reveal_Finder/Show InfolFinder/÷ppna_Finder/Visa i ...


1

Use asterisks... E.g.: /Users/frank/Library/Application*Support/Google/Drive/*.log I use newsyslog to clean my Navicat Lite logs in the library/application support folder like so: # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] ...


0

This works on your example input line: sed 's/.* \([0-9].*)\) .*>/(\1: RAW DATA OUT:/ ' <<\DATA 1: (10/17 12:49:31.175) - CONSTANT ID1 - CONSTANT ID2: RAW DATA OUT > [0x00,0xa2,…,0x00] DATA It prints: (12:49:31.175): RAW DATA OUT : [0x00,0xa2,…,0x00]


1

You can also call perl from bash. The -n arg makes it loop for each line. -e means the script is one line. cat in.txt | perl -ne 's{.*(.*\().*? (.*) -.*(:.*?)\s\s+.*(\[.*)}{$1$2$3 : $4};'


0

sed ' s/^[^(]*// s/([^ ]\+ /(/ s/ - CONSTANT ID// s/ \+>/ :/ ' <<DATA 1: (10/17 12:49:31.175) - CONSTANT ID: RAW DATA OUT > [0x00,0xa2,…,0x00] DATA (12:49:31.175): RAW DATA OUT : [0x00,0xa2,…,0x00] The newlines in the sed script can be replaced by semicolons if you prefer In a while-read loop: while read line; do echo ...


2

I fixed the issue by simply adding the --alldrivers when installing refind. Yosemite dual boot works now like before. Fast, and everything is reconized in the refind boot menu. install.sh --alldrivers


-2

I have a MacBook Pro mid-2012 and just upgraded to Yosemite from Mavericks. Could not see the rEFInd and found the solution here.


0

On Yosemite, rEFind needs to be installed to the EFI System Partition (ESP), which reside on /dev/disk0s1. You could either do this manually by using bless (like in Meow's procedure), or you could simply use the --esp option when installing rEFind, like so: ./install --esp. The problem with this, like noted in rEFind's documentation, is that the boot ...


1

I figured out a workaround for using rEFInd in Yosemite, but please note that it is probably not the best solution. I think the reason of rEFInd is no longer working under Yosemite is because the root partition of the system does not reside in a physical partition any more, thus rEFInd will not be able to be recognized at the boot stage. So, I tried install ...


60

It isn't a shebang, it is just a script that gets run by the default shell. The shell executes the first line //usr/bin/env go run $0 $@ ; exit which causes go to be invoked with the name of this file, so the result is that this file is run as a go script and then the shell exits without looking at the rest of the file. But why start with // instead of ...


8

It runs because by default executable file is assumed to be /bin/sh script. I.e. if you didn't specify any particular shell - it is #!/bin/sh. The // is just ignored in paths - you can consider is at as single '/'. So you can consider that you have shell script with first line: /usr/bin/env go run $0 $@ ; exit What does this line do? It runs 'env' with ...


1

As soon as the listening nc (server) gets closed, the client nc quits as well. On Mac OS X you can open -a 'Activity Monitor' to verify that. The reason why the nc & cat example hangs is not nc but cat that continues to keep its stdin and stdout open for reading and writing. However, when cat tries to write to the pipe after the listening nc has been ...


0

One way to do it is to use top to find the pid of the process using the most CPU. I started a bash CPU hog in one terminal: bash -c "while true; do :; done" Then in another terminal I can kill it as follows: kill $( top -l2 | grep bash | sort -nrk3 | awk '{print $1;exit}' ) Note, since this is osx, this is the BSD top and not the GNU version. -l2 ...


2

You should to try to rebuild the catalog file (B-tree) on the specified file system (which is HFS+) by specifying -r option for fsck, for example: $ fsck.hfsplus -fryd /dev/sdd2 This option currently will only work if there is enough contiguous space on the specified file system for a new catalog file and if there is no damage to the leaf nodes in the ...


1

I thought this is what is documented as Known bugs: Conque only supports the extended ASCII character set for input, not utf-8. - VT100 escape sequence support is not complete. Alt/Meta key support in Vim isn't great in general, and conque is no exception. Pressing Esc+Esc+x or Esc+M-x instead of M-x works in most cases. I haven't used Conque, ...


0

I found a script that does exactly what i want on stackoverflow.com. http://stackoverflow.com/a/20703594


0

In OS X 10.9.5 Mavericks you have to add an alias command to your bash profile file in your home folder: ~/.bash_profile which is equivalent to your user path at /Users/YOUR_USER_NAME/.bash_profile To see that file in finder you have to activate the display of hidden files (e.g. using the app InVisible). Otherwise you can simply use your terminal to ...


1

The log file that last uses was probably rotated on the first of the month. I'm not familiar with OS/X, but check the manpage for the file used, and do something like: last -f /var/log/wtmp.1 to tell last to list the logins from the older file.


0

I'm not sure which version of grep you are using, but if I'm reading the man page of grep correctly, then the scanning will be stopped after the first successful match. Is that what you want? What I understood from your question was that you wanted to "open all files". If you don't mind using vim or gvim, then you can use this: $ grep -n mystring *.ext ...


1

-exec takes the exit status of the command you put in it and uses it logicially within find So, just something simple like this should work find . -iname "*.ext" -exec grep -q "mystring" {} \; -exec open {} \;


1

I prefer the following method... cat example.txt ; echo This doesn't doesn't evaluate the contents of example.txt or occasionally add a newline. It just echos a newline once the cat is done, is easy to remember, and no one is thinking about whether they're using strong or weak quoting correctly. The only downside, really, is that you'll get an extra ...


3

If you have spaces in file names then you need to use print0 option for file, later -0 for xargs, and lastly -I {} for second xargs. find . -iname "*.maxpat" -print0 | xargs -0 grep -l "mystring" | xargs -I '{}' open '{}' Tested with emacs as an open command.


-1

Use pwd by find: find `pwd` -iname *.maxpat | xargs grep -l "mystring" | xargs open


1

Sometimes the copy succeeds and sometimes it fails. Probably it fail because some process in the while wrote to the mounted filesystem, guess that's why is a good practice to umount before :-) dd should really be just open and write, I guess the MacOSX version add some control and I think is easy to understand why with their device names, compared to ...


1

Well, I usually use unp (from terminal), it unzip any kind of compressed file (zip, gz, bz2, tar.gz, etc) it's pretty nice: $ unp mysql-connector-java-5.1.26-bin.jar Archive: mysql-connector-java-5.1.26-bin.jar creating: META-INF/ inflating: META-INF/MANIFEST.MF creating: META-INF/services/ inflating: META-INF/services/java.sql.Driver ...


1

You can typically create actions within the file managers, I know Nautilus provides this service, so you could create an action that's either custom to .zip files or could be a custom action on a context menu that would allow for this. Actions are shown how here in this tutorial: How to Easily Add Custom Right-Click Options to Ubuntu’s File Manager. NOTE: ...


0

The issue here is that the GUI is not doing what you think it is doing. Neither the terminal nor the GUI can write to /usr/bin (which usually has owner: root:root and permissions: 0755/drwxr-xr-x) as an "admin". Only the owner of the directory - root - can do that. However, the GUI has knowledge about what permissions are available and are needed for ...


1

block all pass in on fxp0 proto tcp from any to any port 22 flags S/SA pass out on fxp0 proto tcp from any to any port 22 flags S/SA Please consider you have to change fxp0 to your ethernet according to your operating OS. Reverse of above: pass in on fxp0 proto tcp from any to any port < 22 flags S/SA pass out on fxp0 proto tcp from any to any port ...


1

I would consider filing a bug report. In the meantime, why not letting bash behave more vi-like? Issue set -o vi to use vi navigation in bash. UPDATE I've added this as an issue on the Conque website, here: Issue 106: Bash inside Vim not working properly.


1

Part 1 I assume you're doing something like sudo -u admin_user some_command... (run some_command as admin_user). You mentioned that you have not put the limited user on the sudoers list; therefore the limited user will not be able to invoke sudo at all. Asking for the password is just a formality, and it will reject the attempt no matter what you enter. I ...



Top 50 recent answers are included