Skip to main content

All Questions

Tagged with
0 votes
1 answer
259 views

subl does not open in command line

I am unable to open sublime text from the command line in my mac os. Here is what I did so far echo $PATH My path says /usr/local/bin:/usr/local/bin:/usr/local/bin:/Users/sr027976/.rvm/gems/...
Micheal's user avatar
  • 193
4 votes
1 answer
575 views

unix move cursor after last character

After I use my arrow key to move my cursor left, I am unable to move it back to the end of the line. For instance: If I type: $ echo hello wordl_ Then if I move the cursor left to fix typo $ echo ...
jermel's user avatar
  • 161
11 votes
3 answers
12k views

What is the Unix PATH variable and how do I add to it?

Many programming tutorials ask users to add something to their PATH but don't explain what it is. The existing resources that explain the PATH to users new to the command line are not very good. What ...
Kevin Burke's user avatar
0 votes
2 answers
136 views

Regarding Backup While Using CP

I have some files on the Desktop /Desktop/F1/T1 /Desktop/F2/T2 I want to copy those files to another folder like Destination but If the destination contains a file with same name I want to backup ...
Niresh's user avatar
  • 233
4 votes
2 answers
3k views

Run command as root but create files as another user?

Is there a way to run a command as root (using sudo perhaps) but have the files created by that command be owned by someone else? Some context: I have a web server that I run as root in order to have ...
shawkinaw's user avatar
  • 193
-2 votes
2 answers
2k views

Mac (Linux) - Restore file removed through mv command

I have one big problem. I had two files - main.c and logic.c. I have used sed for some modification in logic.c and then i saved it to main_updated.c and then run mv main_updated.c main.c BUT it had ...
Krab's user avatar
  • 101
4 votes
2 answers
6k views

How to configure the ANSI colors of the command line terminal

I specifically use bash on Mac OS X, but I think the answer would be Unix-generic. I'm already using ANSI colors, but I'd like to reassign different colors to folders, hidden files, etc. Update: ...
Petruza's user avatar
  • 3,883
0 votes
3 answers
13k views

How to recover deleted file in mac? [duplicate]

I wanted to copy a file using cp, however, I happened to type rm and the file was deleted. How can I recover it? The file is stored in a mobile hard disk drive with FAT32 file system I'm using Mac ...
user avatar
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
0 votes
1 answer
711 views

personal .txt archive; utf-8 or utf-16?; need chinese and scandinavian characters; performance irrelevant

So I use plain text for pretty much all information I keep. The files are (or will be) used with shell scripts, emacs, vim, terminal etc. on OSX and Linux. It would be ideal to be able to use English, ...
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
3 votes
4 answers
6k views

How do I keep folders synced and backed up between two macs using a Linux NAS (rsync?)

I've got two primary computers, one Mac Pro and one MacBook Pro for when I'm on the go. I've also got a Linux sever which also acts as NAS. Currently I backup the entire computers to an external ...
Hultner's user avatar
  • 263
4 votes
1 answer
2k views

What's to stop somebody from creating a setuid-root binary on a flash drive, then putting it into another person's computer and getting root access?

What's to stop somebody from creating a setuid-root binary on a flash drive, then putting it into another person's computer and getting root access? I assume there's some kind of protection against ...
Sparkette's user avatar
  • 694
10 votes
3 answers
7k views

Expanding globs in xargs

I have a directory like this mkdir test cd test touch file{0,1}.txt otherfile{0,1}.txt stuff{0,1}.txt I want to run some command such as ls on certain types of files in the directory and have the * (...
Craig's user avatar
  • 273
1 vote
3 answers
412 views

How \ why does echo $'\ec' work? What is it doing to clear the terminal?

On the terminal prompt for OS X I can type in echo $'\ec' and ti will clear the console. I have no idea why this works, though. What is it doing? I'm guessing this would work on other versions of ...
cwd's user avatar
  • 18.3k

15 30 50 per page