1
vote
0answers
31 views

Edit a command? [duplicate]

I'm using many basic commands of unix/linux. In Mac OS X Mavericks, I type cat for a file, but output was faulty. In example, content of the file named bar: foo bar Then: ...
7
votes
3answers
407 views

How to permanently change both STDOUT and STDERR color to grey?

This question is similar to Can I configure my shell to print STDERR and STDOUT in different colors? But I am looking for a solution that will allow me to change both STDOUT and STDERR to ONE color. ...
2
votes
2answers
70 views

In OS X Darwin, why can I interfere with text input across user sessions using cat?

OS X Darwin: Disrupting Terminal Sessions Across User Identities How, in Brief: with cat < /dev/ttys_, in Terminal. My Question This OS X 10.9.2 Darwin behaviour seems odd to me, and I would ...
0
votes
1answer
24 views

Unrecognized Type: for length of date string [closed]

I am getting current date and checking for length of date if non-zero then perform some action. now=$(date) echo "$now" if [[ -n "$now" ]]; then echo "not empty" fi Prints this to console- Mon ...
0
votes
1answer
83 views

What distribution do you suggest for daily use? [closed]

I use my computer everyday for various reasons: programming in c++, android(java), java(in general) listening to music(spotify), watching movies browsing internet, watching youtube clips writing ...
0
votes
2answers
38 views

Merge source files with destination, replacing older ones

I'm looking for the linux equivalent of the DOS command: xcopy from/* to/* /s/e/d/y Which copies over all new files and only replaces old ones. I'll be running this from the terminal of a Mac OSX ...
0
votes
4answers
191 views

How do I store long hostnames list for SSH quick usage?

I have an SSH access to a lot of servers. And all that hostnames (and sometimes usernames) are long and hard to remember. Also even if I tweak my Terminal to keep eternal bash history, the using of ...
3
votes
3answers
363 views

Rename multiple files, sub directories, and insert characters at specific location on OSX

I have files and directories starting with "cateory-icon-" in many sub directories. I am trying to rename them recursively to "category-icons-". Please note that I added missing "g" to the category ...
6
votes
3answers
3k views

Mac OS X: dircolors not found?

I just switched to a Macbook Air. I installed zsh using homebrew, but when I use some of the code that I (originally had) in my .zshrc, I get an error saying that .dircolors was not found. Below is ...
2
votes
2answers
315 views

See extended attributes with coreutils ls on Mac

I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have ls set to use the coreutils version of ls [(GNU coreutils) 8.21] when available: if [ -e /opt/local/libexec/gnubin ]; ...
3
votes
4answers
214 views

Show video files with its size

I need all the .mp4 files' dimensions to be printed with the file name. For example: 1_VIDEO.mp4 1204x680
2
votes
2answers
80 views

“or” in shell glob

I want to ls the files containing the substring "s1r", "s2r", "s3r" or "s19r" in their filenames. I'm almost there! Botched attempts: ls *s[123][9?]r* The above gives me only files including the ...
2
votes
1answer
201 views

Find out where $PATH got corrupted

I'm using OSX Mountain Lion 10.8.2 $echo $PATH prints this: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myusername/.rvm/bin I've commented out everything in ~/.bash_profile ...
1
vote
2answers
714 views

OS X setting environment variables

I have OSX 10.8.2 with ZSH as my shell and iTerm as a terminal (don't know if the last thing is relevant). I have to mention that I'm relatively new to OSX. I'm trying to set up some environment ...
1
vote
2answers
724 views

What is wrong with this call to sed -i?

I have this line find . -type f \( ! -name '*.plist' \) -and \( ! -name '*.mp4' \) -and \( ! -name '.DS*' \) -print0 | xargs -0 sed -i 's/AAA/BBB/g' my intention is from the current directory ...
0
votes
1answer
2k views

Unique lines based on the first field

How can you find unique lines or duplicate lines in a file based on the content of the first field, or the first n characters ? The uniq command on OS X lacks the -w switch that is available under ...
2
votes
2answers
363 views

Am I using bash after this ordeal?

On Mountain Lion, host Coguaro, I login as user coconutpowder using bash: Coguaro:~ coconutpowder$ echo $0 -bash I need to run a command with elevated privileges so I try to su switch to root but ...
2
votes
2answers
307 views

Bash Process Substitution does not work as 'root' on OS X

OS X 10.6.8, if I use Bash Process Substitution as 'root', it just doesn't work. Is it supposed to be so? Why? Note: here's what I mean... "<(list)" mysql -D robottinosino < <(echo ...
13
votes
5answers
849 views

How to remove the (1) from filenames using the find command

I recently converted all of my FLAC files to a lower sampling rate of 44.1 kHz and bit depth of 24 bits (because iPhone/iPod don't support anything above that) using XLD on my Mac OS 10.7 (Lion). ...
9
votes
2answers
10k views

How can I install the `ll` command on Mac OS X?

I'm using Mac OS X. When I SSH into servers I find the ll command useful, but it's not available on my local machine. How can I install it?
1
vote
1answer
57 views

Have to type out whole path in order to execute an application in OSX [duplicate]

Possible Duplicate: How to run my own program without specifying its path One of the applications that I want to use came in a tar.gz, and I unzipped it into my home directory. Well, in ...
2
votes
1answer
425 views

How do I make a droplet/.app in platypus for my unix command?

This is my sample code from the platypus tutorial. I am trying to make it work with a command named pymol, and I want it to open .pdb files or open just pymol. I know nothing about perl, but I have ...
7
votes
1answer
274 views

in zsh, how do I hide the backslashes in the completion menu

On Mac OS X 10.6, zsh. I have set in .zshrc: setopt automenu …to get a completion menu below the prompt. When I type: cd <TAB> I see a completion menu with all directories that have spaces ...
2
votes
2answers
263 views

Different sleep binaries on Mac (Darwin) and in Linux. How to properly handle the differences?

In my Linux box, sleep accepts seconds, minutes and hours. So: sleep 10m Sleeps for 10 minutes (or 600s). sleep on Mac only accepts seconds as argument. sleep 10m doesn't work, only sleep 600s. ...