Skip to main content

All Questions

Tagged with
648 votes
7 answers
935k views

Permissions on private key in .ssh folder?

I changed my permissions in my .ssh folder and now when I use a piece of software that uses my private key, I have to type my password each time. What should my permissions be on my id_rsa file to ...
user avatar
295 votes
5 answers
144k views

What's the equivalent of Linux's updatedb command for the Mac?

If I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the ...
Thierry Lam's user avatar
  • 4,397
192 votes
6 answers
94k views

What's like OSX's pbcopy for Linux

In a terminal in OSX I can pipe output to pbcopy and then go into a web browser and paste it. I tried this in Linux with xcopy but when I switch to the browser it just overwrites the clipboard with ...
tony_sid's user avatar
  • 14.5k
138 votes
4 answers
171k views

ip command in Mac OS X terminal

I use the command ip link in Linux. Now I want it on Mac OS X, but the Mac OS X terminal doesn't have ip. What should I use instead?
Aryan's user avatar
  • 1,483
118 votes
11 answers
64k views

Linux / OS X tar incompatibility – tarballs created on OS X give errors when untarred in Linux

When I tar up files on my Macbook and untar them in Linux, I repeatedly get the following warnings/errors: tar: Ignoring unknown extended header keyword `SCHILY.ino' tar: Ignoring unknown extended ...
Dave Dopson's user avatar
  • 1,275
100 votes
2 answers
179k views

How do I clear out the ssh-agent entries (on Mac OS X )?

I'm running Mac OS X, and it appears that after SSHing to several machines, using identity files, my 'ssh-agent' builds up a lot of identity / keys and then sometimes offers too many to a ...
cwd's user avatar
  • 18.3k
91 votes
5 answers
198k views

How do I get the size of a Linux or Mac OS X directory from the command-line? [duplicate]

What command do I use to find the size of all the files (recursively) in a Linux or Mac OS X directory?
Daryl Spitzer's user avatar
85 votes
17 answers
105k views

Untar, ungz, gz, tar - how do you remember all the useful options?

I am pretty sure I am not the only one with the following problem: every time I need to uncompress a file in *nix I can't remember all the switches, and end up googling it, which is surprizing ...
80 votes
9 answers
69k views

How do I get ls --color=auto to work on Mac OS X?

I'm trying to move my bash configuration from Ubuntu to Mac OS X and it looks like ls is slightly different. For instance, it won't accept the --color option. How do I get this to work?
cfischer's user avatar
  • 9,093
65 votes
14 answers
126k views

Batch convert encoding in files

How can I batch-convert files in a directory for their encoding (e.g. ANSI → UTF-8) with a command or tool? For single files, an editor helps, but how can I do the mass files job?
desolat's user avatar
  • 1,102
59 votes
3 answers
141k views

What is the equivalent of the Linux command "sudo fdisk -l" in MacOS?

In Linux, the command sudo fdisk -l produces an output that lists all the disks and partitions in the computer. Here is an example: If I try to use sudo fdisk -l in MacOS X 10.7.5, the output is the ...
Vito Gentile's user avatar
56 votes
4 answers
81k views

Find libraries a binary was linked against

I know that there is a command that lists me the libs and respective versions a software was linked against. Something with ld or libtool? But I just cannot remember. Spent some time on google but ...
er4z0r's user avatar
  • 791
48 votes
6 answers
63k views

How can I install objdump on Mac OS X?

I want to get the source code of a small command line tool using objdump on Mac OS X. I've used arm-linux-objdump on Linux and find it a great tool. Is there any way to install objdump on OS X? I've ...
Chilly Zhong's user avatar
46 votes
1 answer
13k views

What's an elegant way to copy the creation and modification dates of a file to another file?

How can I set the time information of a file to be the same as of another file on OSX / Linux?
GJ.'s user avatar
  • 9,903
42 votes
8 answers
32k views

How to pipe text from command line to the clipboard

I'd like to do something like dir *.* > clipboard ie. get to get the standard output of a command line program copied to the clipboard. Can this be done on a standard XP machine without ...
Ville Koskinen's user avatar
41 votes
6 answers
107k views

How does Mac's command line compare to Linux?

I love Ubuntu Linux - especially the commmand line. But I have to admit that, at least for now, Windows is more user-friendly - there's more software for it, more drivers, and more stuff just works. ...
Nathan Long's user avatar
  • 26.8k
39 votes
2 answers
29k views

what does the @ symbol mean in ls -l directory listing? [duplicate]

Possible Duplicate: ls -la symbolics… what does that last symbol mean? When I run ls -l on my mac I see two .yml files: -rw-r--r-- 1 aa staff 6 Apr 15 05:50 s1.yml -rw-r--r--@ 1 aa ...
Andrew Arrow's user avatar
33 votes
4 answers
16k views

Replace OS X's shell commands with the linux versions?

The commands available by default in the Terminal in OS X, don't seem to behave like their linux versions. How can I replace all of them with the actual GNU linux commands? For example sed -i ...
TheOne's user avatar
  • 1,395
33 votes
4 answers
18k views

Moving a file while it's in use -- How does it work?

I've noticed that on non-Windows OS.... ie Linux/Mac I can do things like: Send a zip to a friend over aim Delete the file while it's in transfer And the transfer does not fail. Or, I can do ...
Mario Zigliotto's user avatar
29 votes
3 answers
68k views

What does kill -3 mean?

I know what kill -9 means, but anyone can explain what does kill -3 mean? Is there any special signal it sends out?
user705414's user avatar
  • 1,445
28 votes
7 answers
111k views

What is the terminal command other than ctrl + c to exit a running Node.js program in a macOS?

In Linux terminal if I run a command like: $ node httserver.js The command runs and by doing ctrl + c the program is terminated and new line comes in terminal for us to enter a command. I felt ctrl ...
Sagi_Avinash_Varma's user avatar
28 votes
4 answers
16k views

Efficient key bindings using both Mac and Linux

I'm still switching back and forth all the time from Linux to Mac, and I can't figure out how to stop getting confused in my keystrokes, especially with browsers, and Unix apps. Here's the situation: ...
justingordon's user avatar
  • 1,633
27 votes
4 answers
46k views

Adding a line into the hosts file, getting permission denied when using sudo - Mac

I'm trying to add a line into the hosts file on my Mac by executing a one line command on the terminal. I thought this would be easy using sudo, but it returns "permission denied" when I try to add &...
Mint's user avatar
  • 168
27 votes
2 answers
31k views

Filesystem compatible with GNU/Linux and Mac

Which filesystem is compatible with GNU/Linux and Mac OS? I want to be able to read/write from both GNU/Linux and Mac OS. For example I want to copy a file to my external hard-drive from GNU/Linux and ...
user avatar
25 votes
4 answers
10k views

How to get tree -a to ignore .git directories?

I love using tree to list directories, and I have a git repository with all my dotfiles. For me to be able to see them I need to do tree -a, but that will also list the contents inside the .git ...
user avatar
25 votes
5 answers
172k views

Copy files from Linux server to Mac desktop

I have a folder on a Linux server and I have to transfer that file from there to my Mac desktop. I have never done it. What is the best way to do that? I am trying to use terminal but is there any ...
user avatar
25 votes
4 answers
56k views

What's the difference between .profile and .bash_profile, and when do you configure which? (Mac) [duplicate]

Possible Duplicate: Difference between .bashrc and .bash_profile What's the difference between .profile and .bash_profile, and when do you configure which? I.e if I configure the .bash_profile, ...
Imran's user avatar
  • 373
24 votes
6 answers
32k views

Command line tool to identify audio file specs

I'm looking for an audio file equivalent to ImageMagick's identify command. For example, with identify, I can get brief information about a bunch of images: % identify b* banner1.jpg JPEG 134x614 ...
Doug Harris's user avatar
23 votes
3 answers
2k views

Sudo su vs su linux

If I enter in the password to su when prompted, it doesnt work while sudo su does. Also, when a command is executed using sudo (command), does sudo automatically execute it by root by default (since ...
agz's user avatar
  • 8,328
23 votes
5 answers
33k views

what is ranlib?

I have been using a MacOSX system for a while, but just only recently started poking into the guts. I found a guide telling me to run 'sudo ranlib /usr/local/lib/libjpeg.a'(installing libjpeg). I have ...
Ying's user avatar
  • 835
23 votes
1 answer
18k views

How to overwrite a symbolic link of a directory?

There are two directories foo1 and foo2. At first I make a directory symlink by ln -s foo1 bar. After that I want to change the symlink, so I typed ln -sf foo2 bar But bar is still linked with foo1. ...
ironsand's user avatar
  • 2,339
22 votes
7 answers
80k views

No /mnt/hgfs in Ubuntu guest under VMWare Fusion

I just installed Ubuntu 13.04 inside of VMware Fusion Pro 5. I have the virtual machine configured for read-only sharing of my home directory, but there's no /mnt/hgfs directory and there's no /etc/...
Lorin Hochstein's user avatar
20 votes
6 answers
110k views

tcpdump – rotate capture files using -G, -W and -C

I'm looking to be able to capture a rotating tcpdump output which captures 30 minutes worth of data, into 48 files, cyclically. The man page implies this should be possible, but my testing doesn't ...
Andrew's user avatar
  • 558
20 votes
1 answer
38k views

Preserve ctime with SCP

How can I copy a file using SCP while preserving ctime (modification time)? I have a folder on my Mac (OS 10.8), and the results of ls -l and ls -lc are the same. $ ls -l total 0 drwxr-xr-x 9 ...
Elliott B's user avatar
  • 1,265
20 votes
2 answers
37k views

Rsync installed but still getting an error command not found

I am trying to sync a local folder to a remote server using a non standard port and my rsync command is as follows: rsync -avz ~/Research/Folder1/folder2 -e "ssh -p 3345" [email protected]:/home/...
Morpheus's user avatar
  • 305
20 votes
3 answers
10k views

How to configure dual boot NixOS with Mac OS X on an (U)EFI MacBook?

I could not find any description of configuring dual boot of NixOS and Mac OS X on an (U)EFI MacBook. I am willing to experiment, but i would like to know at least that what i will try is supposed to ...
Alexey's user avatar
  • 1,211
19 votes
2 answers
14k views

dd performance on Mac OS X vs. Linux

I was trying to copy an iso of the windows installer onto a hard drive to avoid burning a disk. I first tried Disk Utility's restore function, however it didn't like the ISO for some reason. Then I ...
charliehorse55's user avatar
19 votes
5 answers
16k views

How to list files recursively and sort them by modification time?

How do I list all files under a directory recursively and sort the output by modification time? I normally use ls -lhtc but it doesn't find all files recursively. I am using Linux and Mac. ls -l on ...
qazwsx's user avatar
  • 9,049
19 votes
2 answers
25k views

Highlighting text in the default Windows CHM viewer

How do I set up the default CHM reader in Windows to highlight text? Is this even possible? When I read ebooks I need to highlight some of the text and it's just not there in the default CHM program....
n1kh1lp's user avatar
  • 353
18 votes
3 answers
10k views

How to list directories names but not their contents, in *N*X?

If I do a simple ls specifying a filename pattern, like ls A*, for directories that match the pattern, it will enter the directory and give the full listing, but how could I get just the listing for ./...
Petruza's user avatar
  • 3,883
17 votes
2 answers
24k views

Clearing Spotify cache to recover disk space?

When you play a song in Spotify, some hard drive space is used to cache the file, so that it plays faster the next time it is selected. Is it possible to clear the cache (without the use of third ...
Simon's user avatar
  • 4,487
17 votes
4 answers
5k views

Why aren't all Mac applications easily portable to Linux?

Since the Apple OS-X operating system is a UNIX derivative (BSD), and the underlying (Intel) Mac architecture is the same, why isn't it very straightforward to get Apple-specific applications running ...
Nick Pierpoint's user avatar
17 votes
3 answers
22k views

How to force ls terminal command to show results in Bytes while I have set the default to ls -h in bash profile?

I am following the snippet here to improve my terminal command in Mac OSX. It sets the default value of ls results to human-readable by exporting alias ls='ls -GFh' to bash profile file. This is very ...
cybergeek654's user avatar
17 votes
4 answers
15k views

How to truncate large file on osx?

I have a 500mb file. I want to keep only the first 5 mb. How can I truncate it on osx where the 'truncate' command isn't available (and can't be installed by homebrew)?
donald's user avatar
  • 171
16 votes
4 answers
84k views

How do I recursively remove subdirectories and files, but not the first parent directory?

I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf However, I ...
Michael Prescott's user avatar
16 votes
2 answers
18k views

How do I disable indexing in a specific directory across multiple platforms?

I have some files that will be accessed across several platforms (Mac OS X and Windows 7 mainly, but I wouldn't rule out Linux in the future) and I do not want these files indexed by the search ...
CyberSkull's user avatar
  • 1,495
15 votes
2 answers
24k views

POSTing a file's contents with CURL

(The following is backstory, you can jump down to "Question:" if you'd like) There's a webpage for one of my courses that accepts input text (expected to be Python code) and then gives some tokenized ...
Cornstalks's user avatar
15 votes
3 answers
29k views

If, else based on command piped to grep

I can't figure out how to make this (what supposed to be simple) script to work. Basically what I want, to run different stuff based on the state of my Parallels vm, something like this: if [ prlctl ...
iLemming's user avatar
  • 667
15 votes
4 answers
41k views

Getting UEFI shell when trying to boot OS X in Virtual Box

I am using the latest test build of Virtual Box (normal versions don't work on El Capitan). When trying to boot a Virtual Machine with an El Capitan cdr file (created from the command line) I end up ...
iProgram's user avatar
  • 653
14 votes
6 answers
4k views

Syncing bash profile between computers

I have tons of stuff in my .bash_profile. The problem is, I use ~3 computers very frequently, and I'm tired of having to copy paste my prefs everywhere. Two of them run Ubuntu 10.10, and one runs OSX. ...
Josh's user avatar
  • 423

15 30 50 per page
1
2 3 4 5
20