Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

0
votes
1answer
63 views

How do I set what should happen in terminal on a certain command?

If I execute cal 2013 in terminal, it echoes the calendar for the year 2013. For the matter of fun, I'd like the terminal to echo This year won't come. How should I do this? I tried adding ...
0
votes
1answer
586 views

UNIX: Find all directories that match string and copy a file there

I was wondering how to file all directories that match a string and then if found, copy a file from root to that directory.
0
votes
3answers
179 views

Unix/Mac [bash/c api]: detect if a given path points to a file on a removable device

Is there a *nix command or C api that will tell the type of the storage device given the path to the file (resolving the mounts, symlinks, etc)? I need to find out whether the file lives on a ...
0
votes
2answers
287 views

Shell: Trim whitespace in the beginning of files

I have 20k files in here, and at least 1000 of them having white space in the beginning. How can I remove whitespace with sed for example? The problem is, that it may apear some duplicated file ...
0
votes
3answers
1k views

Creating dotfiles for iTerm.app and Terminal.app — how to detect 256 color support?

I’m creating custom dotfiles (.bash_profile and the like) for use with OS X’s Terminal.app and iTerm.app. I’d like to configure some settings conditionally, based on whether the active application ...
0
votes
2answers
254 views

Chmod, Groups, and Users

So I've tried looking this up but I've not found similar examples (please feel free to refer to them if your Google skills are better than mine). What I'm trying to do is as follows: I am hosting a ...
0
votes
2answers
399 views

OSX: Python packages fail to install, error message “/usr/local/bin: File Exists”

I keep trying to install django and other python packages, and I keep getting the exact same error message: Installing django-admin.py script to /usr/local/bin error: /usr/local/bin: File exists So ...
0
votes
3answers
5k views

Avoid printing line breaks in shell script

while read pos; do string1=`echo $pos | cut -c 20-38` string2="=$pos" string3="$string1 $string2" echo "$string3" done < file This is the code of my script. I want to ...
0
votes
1answer
42 views

How do I view and edit last expression used in a find in vi?

Is there a way to bring up the last regular expression used in vi for a search? If I enter a long regular expression, it would be nice to just edit the expression if it was incorrect or other ...
0
votes
2answers
5k views

Mount a directory in read only filesystem to read write

I want to delete a particluar directory in a read only file system. How to mount its parent directory it in read write mode so that I can delete tha. I tried different things after googling. But could ...
0
votes
2answers
435 views

Is portsentry malicious/backdoor?

I recently figured out that a program called portsentry is listening on ports 1 and 111 on my server, but I don't remember installing it! I wonder if it is a malicious service. I searched through ...
0
votes
3answers
1k views

Installed Apache, now.. where should I place my web content?

I've just installed apache on Ubuntu and I see the page "It works!". I now want to install my website and I was wondering in which directory should I copy it.. Also, is it good to copy it in the ...
0
votes
2answers
318 views

Shell scripting: handling currency arguments

I want to run a script that takes arguments in a currency format. Example: > ./myscript $55.50 total is $55.50 > ./myscript $3.40 total is $58.90 Now, no matter how hard I try to escape the ...
0
votes
1answer
825 views

Unix: How to one-way-sync directory with FTP directory

Is there a good command I can run from the Terminal that will one-way sync a directory with an FTP directory in a smart way? I'd like it to for example delete all files on the FTP that no longer ...
0
votes
3answers
1k views

How do I make a simple shortcut on my Mac to go to screen saver mode?

I just want to push 2 buttons at the same time to go to screen saver mode. Is there a setting for that in system preferences where I can set my keyboard shortcuts?
0
votes
2answers
1k views

What is the best SVN GUI interface program for Sun Solaris UNIX?

I have SVN installed on another server and I want to access it on Solaris. Please give me idea how to do it? Is there any tools available?
0
votes
3answers
361 views

Editing/Saving Files live on unix server

I can connect remotely to my unix server via SSH, both ftp and shell mode using port 22. However I am not able to do so in Visual Studio. I want to be able to edit files live in a GUI interface. Any ...
0
votes
4answers
167 views

Unix permissions issue

An executable file has permissions -rwxrwxr-x and owner is root. When a non-root user tries to execute the file, I get a permission denied error. What am I not understanding?
0
votes
3answers
433 views

Installing ethernet device under LynxOS

I changed my hard drive which was running LynxOS to another computer with diferent processor/mother board but same periphericals configuration. Everything is working except the network ethernet card. ...
0
votes
2answers
259 views

When re-directing to a file in linux tcsh, how can I change the write buffer size to be larger?

In linux tcsh, if I am creating a log file like: CMD > cmd.log How can I make the write buffer, which caches the data before sending it to disk, be larger than the default? How can I buffer more ...
0
votes
2answers
278 views

Default key-binding to clear the command line

What is the default keybinding under Midnight Commander for clearing the command line at the bottom ? ( not the one you get with Ctrl-O, but the one-line prompt )
0
votes
3answers
94 views

Unix: How to check the existence of a tag at the beginning of each file before insertion?

The question is related to the question "Unix: Add a Tag to the beginning of each file?". How can I put the tag only to the files that do not contain the tag, such as <?php, already?
0
votes
2answers
15 views

What's the smartest way to copy-rename (backup) several files in different folders at once in the shell?

I want to copy-backup several files in different folder at once before updating ntpd. Example (one file only): sudo cp /usr/sbin/ntpd /usr/sbin/ntpd.old Files: /usr/bin/sntp /usr/bin/ntp-keygen ...
0
votes
2answers
22 views

How to append data in a file by dd?

I want to append new data in a file stored in SSD. dd if=/dev/shm/test of=/data/sdb/test bs=1G oflag=append But df -h shows the dd command always overwrite the test file, instead appends new data ...
0
votes
1answer
25 views

Environment variable LC_ALL is always unset by default. why LC_ALL is unset?

Why LC_ALL is always unset by default on Linux and Unix machines? For example, on Linux: root@icubes:[~]# locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" ...
0
votes
2answers
34 views

Linux terminal for virutalization purposes, no X windows

I was wondering if I could download a linux distro somewhere that just featured the terminal with no GUI. Would this be possible in a Ubuntu liveCD?
0
votes
1answer
42 views

change permissions to a directory to 701

I'm supposed to change permission to a ~ directory to 701, thing is this is a web programming class and I know nothing of unix. I managed to get remote access and I can execute commands, so can anyone ...
0
votes
1answer
37 views

How do I make less open binary files without confirmation?

I have several log files that contain a few bytes which are not displayable characters (due to binary signatures on the requests). Every time I open them with less I get asked: $ less ...
0
votes
2answers
81 views

How to ignore a specific SMART error

I get an email about the same SMART error every day. I'd like to configure the SMART daemon to ignore this specific error, but only this, since I still want to now if anything changes or gets worse. ...
0
votes
2answers
91 views

Is there a unix command to output time elapsed during a command?

I love using time to find out how long a command took to execute but when dealing with commands that execute sub-commands internally (and provide output that allows you to tell when each of those ...
0
votes
2answers
203 views

Is it better to check if file exists before deleting it

Sometimes when I want to delete a file (from within a script), I will just delete it rather than checking if it exists first. So I do this: $ rm "temp.txt" 2>/dev/null Instead of this: [ -f ...
0
votes
2answers
53 views

How to find number of `_`-separated words?

I want to make a Unix command that reads a string and counts how many words it contains. In my case the words are separated by a _ (underscore) character, not spaces. For example, TABLE_PERSON ...
0
votes
1answer
29 views

Replace '-' char using sed

I have a text file, quite similar to this one: JACK BLACK 123456 -1245368 - BRIDGET RED 1245 548425 + JOHNNY HOMUSS 55482 -4325 - I wanted to use a sed command ...
0
votes
2answers
36 views

Inserting a linebreak in lines starting with a pattern

I have a huge file that has the following format: #pair: 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 ...
0
votes
1answer
459 views

vi Error | Out of memory saving lines for undo - try using ed

While executing the following command on a large file: vi largeFile.log I get the following error: Out of memory saving lines for undo - try using ed My environment is: AIX6 I cannot add any ...
0
votes
1answer
113 views

How can I organize my Windows directories more efficiently? [closed]

I've been using Windows (7 now) for years now, but I can never figure out how to efficiently organize my directories and programs. I'm finding it difficult to locate and run programs that are spread ...
0
votes
2answers
47 views

Error - fi:command not found

if 0 -eq 0 then echo uploaded fi fi: command not found why?, can some one oint out the misake?. I am very new to unix scripting. I amusing 'csh'
0
votes
2answers
156 views

cat wc -l count lines line with defined line endings (e.g Mac OS X specific)

As any command-line user I sometimes want to count lines in text file with well known command: cat some_text_file | wc -l I face the problem on Mac OS X, which as far I have it studied is connected ...
0
votes
1answer
98 views

How to find the matching records from 2 files in unix

I have two files which contains email_ids. 1. Test1.txt 2. Test2.txt Test1.txt contents are: abc@gmail.com xyz@gmail.com mns@gmail.com Test2.txt Contents are: jpg@gmail.com joy@yahoo.com ...
0
votes
1answer
135 views

What is the maximum memory (RAM) limit for Solaris 11?

I have been trying to find out the maximum memory limit for Solaris 11 for a report that I am doing but with no luck. Can anyone please help?
0
votes
2answers
209 views

how to use grep and mv together in a directory in shell?

how do you grep the contents of all files in a directory for "TEST" then move those files to a different directory(like the home dir.)?
0
votes
1answer
375 views

How To Let Certain Unix-User To Access Only One Directory

How To Let Certain Unix-User To Access Only One Directory, e.g. I want to let the following username dimension to access the following directory only /var/opt/test/reports/* How i can make that ...
0
votes
1answer
131 views

Print to file using enscript

I want to print to file using the unix command enscript. I've looked in the man pages but can't figure out how to get it to print to file without it going straight to the printer. Thanks
0
votes
1answer
111 views

Permissions of files/directories in Unix

It appears that each file/directory has a given set of permissions shown by the 10 characters to the far left of each listing if one were to type into the terminal ls -l Considering that you can ...
0
votes
1answer
37 views

if recursively find ext, then, else on unix

This is what I normally use. But I need to recursively find an extension with, then, and else. The problem with this one is that it is not recursive. if ls $HOME/Downloads/*.ext >/dev/null ...
0
votes
2answers
65 views

What is the difference between different “make” commands?

So after running configure file on source codes for different applications one enters make and make install to install the application. My question is what is the difference between make and make ...
0
votes
1answer
2k views

Why can't I cd into a directory that is owned by a group that I belong to? [duplicate]

In the home folder of the pi user on my Raspbmc distribution, I have the following directories: $ sudo tree . -L 2 . `-- downloads |-- complete `-- incomplete They're owned by the ...
0
votes
3answers
117 views

iptables rule to block traffic not specified in all other rules

Is there a way to add a rule in iptable to block traffic not specified/covered in all other rules ? I know that we can use ! to block specific ports and ip addresses but there are just too many rules ...
0
votes
1answer
305 views

Website hacked 'FaK3SSH was here' how to remove?

our website has been hacked, check it here. I don't know what to do exactly and I can not contact my hosting provider at the moment since it's Sunday. Any idea where to begin to remove this? Website ...
0
votes
1answer
139 views

How to prevent users from renaming files while providing write permissions on Linux

For some special purpose, I want to prevent non-root users of the Linux Server from changing the filenames. However, they can modify and write to the contents of the file. How to do this from command ...