Questions tagged [unix]
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.
3,990
questions
1
vote
2
answers
269
views
Unix (Gnu/Linux, Mac OS X) program or command to count HTTP connections made by a program
I have got a testing suite for an applications that performs lots of HTTP requests.
This number changes each time you run the tests. Is there a Unix command or program that "listens" to another ...
1
vote
1
answer
252
views
Stuck while connecting to a linux machine
I am trying to connect to my linux machine using and it kind of connects but the prompt is stuck here,any inputs on what is wrong here?also there was build running that is just stuck...so I tried to ...
3
votes
2
answers
148
views
Is there a specific name for the .. or . on *nix systems?
Just what it says. Do they have a name besides "those dot thingies"?
1
vote
2
answers
69
views
Quantifying responsiveness in solaris machine
I am one of the n users of a shared unix machine. For reasons unknown, the machine is not "responsive" enough. For example, it is slow on interactive commands, it takes few noticeable moments for any ...
0
votes
1
answer
159
views
Tunneling from one unix server to other unix server using ssh
I am trying to connect one Unix server to another. Direct login is possible, but logging in through a tunnel is failing. I'm creating the tunnel connection using:
ssh -N -f -L 6002:bsc2:22 lsm@107....
1
vote
2
answers
900
views
Error with the linux/unix command.permission denied
When I enter the following command in my mac OSX terminal i get a "permission denied" error even though I have administrative privileges.
Command:
administrators-Mac-mini-2:Build Foldername sarwan$ ....
6
votes
5
answers
6k
views
terminal-window viewer for tab-delimited files in *nix?
I work with a lot of tab-delimited data files, with varying columns of uncertain length.
Typically, the way people view these files is to bring them down from the server to their Windows or Mac ...
1
vote
1
answer
459
views
Unix Cached Memory
We have a problem where the cached memory is filling up rapidly on our system.
We are not sure why this is filling up so quickly and would like to understand why
Is there any script/commands ...
0
votes
3
answers
84
views
Perform shell operation through secure shell
Is it possible to perform a shell operation from a bash script through a secure shell.
Here is an example of why you may want to do this. Lets say you have a simple unix operating system that you ...
3
votes
3
answers
897
views
Why is the setuid permission bit not set for mkdir in modern Unix systems?
Bach states the following:
mkdir is a typical setuid program. Only a process with Effective UID root can create a folder. (Section 7.6, Page 229)
I checked the permissions on it on Ubuntu 12.04, ...
2
votes
2
answers
4k
views
How to have .profile sourced automatically
I added to the path in ~/.profile and the path will be updated if I
source ~/.profile
but on system restart, ~/.profile is not loaded. How can I make it automatic so I don't have to source it? Is ...
17
votes
1
answer
7k
views
Does rm -r follow symbolic links?
If I have symbolic links in some subtree of my directories and decide to recursively removed a driectory and its contents, will that remove items symbolically linked in the tree?
0
votes
1
answer
251
views
the effect of large number of files on disk space in unix filesystems
If I have a text file in Unix that contains N-many independent entries (e.g. records about employees, where each employee has a separate record), is it expected that this file will take up less space ...
1
vote
1
answer
143
views
Unix command to find files read by specific user
I would like to find files accessed by specific user (even just read) within a folder tree. I thought the find command had this option, but it actually just searches for owner user. Is there any other ...
0
votes
0
answers
895
views
Automation script to SCP from UNIX to Window Server
I'm new to server/Unix trying to transfer file between AIX to Windows
I'm trying to create SCP or SFTP script that will run on cron and transfer text file on /usr/apps/11.111.1.11.log file to window ...
1
vote
1
answer
1k
views
How to use faketime at bash?
Have a problem with command faketime.
Trying to use it, but always get an error:
faketime -t "2000-01-01 01:00:00"
/usr/bin/faketime: 102: exec: 2000-01-01 01:00:00: not found
I have Ubuntu 12.04
4
votes
1
answer
567
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 ...
0
votes
1
answer
951
views
Create a fake or dummy virtual printer on HP-UX
I need to set up a fake printer in HP-Unix.. It doesn't need to do any printing but it needs to act as a printer so that an application thinks there is a printer.
Can some help me with a script for ...
3
votes
1
answer
574
views
How can I get a list of directories with ack?
I have a directory listing as follows (given by ls -la):
total 8
drwxr-xr-x 6 <user> <group> 204 Oct 18 12:13 .
drwxr-xr-x 7 <user> <group> 238 Oct 18 11:29 ..
drwxr-...
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 ...
-1
votes
1
answer
139
views
What does SH stands for in file permission
I am parsing some directory lines using FTP and I am getting an error on this type of file:
drwx----SH 1 user group 2048 JUL 27 2012 FOUND.000
Does anyone know what SH mean ?
Thanks.
5
votes
1
answer
449
views
Merge sorted lists
I have a few .txt files (in the same directory) that look like this:
123 carrot
50 apple
13 tomato
5 potato
2 pear
and
100 carrot
10 apple
3 tomato
2 potato
...
0
votes
1
answer
296
views
What is going wrong with cat
i have a very basic cat problem.
I have 23 files, all is one line and around 100000 columns.
I am trying to merge these one lines.
I type the command cat test1 test2 > outcome
The command line is not ...
2
votes
1
answer
3k
views
sshpass installation
I want to use passwordless SSH for logging in. I used sshpass to achieve this.
The problem is when I am trying to install sshpass through sudo apt-get install sshpass. It asks for password.
After I ...
3
votes
1
answer
316
views
UNIX shell command to expand files of any compressed type
Is there any UNIX shell command to expand a compressed file which type is not known in advance?
I should be able to use this command to expand at least any of the following types of files, though the ...
2
votes
2
answers
403
views
grep from one but not the other
How do I grep OUT the content of a file from another file
Say I have a file "file1" and it has
a
b
c
and another file "file2" that has
a
b
c
d
e
f
I would usually do
cat file2 | grep -v a | ...
1
vote
1
answer
8k
views
Extracting just the words from a text file
What's the Unix command to take a text file and strip away whitespace and punctuation, leaving only the words, one word per line?
0
votes
1
answer
818
views
tar -rvf not working
I am trying to append a .txt file to my already created .tar archive file. But the following error is showing up:
tar -rvf kits.tar example.txt
tar: This does not look like a tar archive
...
-1
votes
3
answers
1k
views
make command for installing in linux give it a directory
I want to install bedtools (i.e., a c++ source code for manipulating certain types of files). In order to install it the installation instructions says to download the tar file, untar the file, go to ...
4
votes
2
answers
3k
views
Unix "time" command with pipeline prints no time-report
Of the two C-shell aliases below, only the first prints the time command's report of elapsed time. How can I get the alias with the pipeline to also print the time report?
alias make1 'time make'
...
10
votes
3
answers
6k
views
cp -u is illegal on mac. What are the alternatives?
I have a MacbookPro Lion, and I have tried to archive my files that is tried to copy and overwrite if the source is newer than the destination. I tried the following command
cp -u source destination
...
6
votes
1
answer
2k
views
How to create alias for - minus sign
I want to map the - to cd -
I've tried escaping it, w/ and w/o single/double quotes but neither of them seems to work.
alias \-='cd -' or alias '-'='cd -'
=>
bash: alias: -=: invalid option
alias:...
5
votes
2
answers
11k
views
Diff two files side by side, new lines on left column for no match
This has been getting the good half of my day and I am sure such a solution must exist (if not, then I am programming one), but alas, here is the question.
I have two files, hpc.sorted.modules.txt ...
3
votes
1
answer
415
views
Run script when shutting down Ubuntu before the logged in user is logged out
I'm writing a script to backup some local directories on a Unix machine (Ubuntu) to a Samba drive. The script works fine and I've got it running at shutdown and restart using the method described at [...
2
votes
1
answer
465
views
Sorting a list of files
Maybe am missing something but how do i sort in a descending order a list with this naming
B7
B40
B41
B42
B8
B43
B20
B45
B53
B47
B48
B5
B6
sort -n does not sort the way i would like
B5
B6
B7
and ...
0
votes
2
answers
732
views
How do I sort command-line output?
I'm trying to use du to sort the output by filesize, but it doesn't looks like there's an option for that.
Can I pipe it into another command to handle the sorting?
1
vote
1
answer
103
views
Converting strings in input file
I have a text file file1.txt on Unix. I'd like to produce another file file2.txt, in which I change all groups of lines that has this format (taken from a multiple-choice exam)
a. [first choice]
b. [...
0
votes
2
answers
2k
views
How to make daemon starts automatically? Ubuntu server 12.04
I have nginx and postgresql daemons installed. How can make them start automatically every time server is started?
I think to add
sudo service nginx start
sudo service postgresql start
to ~/....
0
votes
2
answers
3k
views
File doesn't exist in Linux although it's located in Terminal
I'm a bit new to unix/linux environment, but I have a small problem.
I'm using "locate" to find the path of a file I need, it gives me the path for it, but the file doesn't exist in that path, like ...
1
vote
1
answer
454
views
ssh into server behind a gatekeeper in one step (involving sudo) [duplicate]
Possible Duplicate:
non-interactive ssh sudo… prompts for the password in plain text
Here's the current workflow I have (already have some settings in my .ssh/config):
scribu@localhost$ ssh core
...
3
votes
3
answers
3k
views
Can I rename a file that contains a forward slash in Unix?
I am trying to rename a file with a name that contains the "/" character.
Example:
mv product.dat product/2012.dat
Is this possible in Unix?
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 ...
1
vote
2
answers
3k
views
Transfer disk image to larger/smaller disk
I need to switch the hard drive on a 2006 iMac to a new SSD. I don't have the original installation CDs. I know I can order CDs from Apple, but this costs money.
Someone told me it's possible to rip ...
0
votes
2
answers
478
views
Unix list absolute file name
Given an arbitrary single argument representing a file (or directory, device, etc), how do I get the absolute path of the argument?
I've seen many answers to this question involving find/ls/stat/...
2
votes
2
answers
16k
views
How do I locate php.ini?
I installed php on the server and php_info(); displays:
Configuration File (php.ini) Path /home/gmcnulty/php
However, I don't see anything there nor do I see any php directory?
How do I ...
0
votes
1
answer
208
views
Is it possible to open server ports on TUN devices?
If I make a VPN connection to a server (say myvpn.com; assume this server is not behind any router/firewall) via a TUN device and open a port (say 5555), will someone else be able to connect to me via ...
0
votes
2
answers
2k
views
How can i use the `eject` command on a computer i have SSH'd into?
So if i do eject on my machine, it works exactly as expected, however, if i ssh into the machine next to me, and do the same thing, it does not work...
my computer:
eject: using default device `...
2
votes
2
answers
2k
views
Why there is difference between output of linux command du and ls?
I have a file in linux machine whose size is 3404494030 upon doing "ls -l". When I do "ls -lh" it shows 3.2 GB which is correct when converted from bytes to Gigabytes. But when I do "du -h" for the ...
0
votes
1
answer
1k
views
differnce between blocksize and bytesize in linux/unix filesystems
Can anyone discuss the exact difference between block size and byte size, when it comes to disk sizes for Linux/Unix filesystems.
0
votes
1
answer
50
views
Is there any way to access files belonging to another group?
-r--r----- 1 root scratch 13 Nov 11 15:11 scratch.txt
I am a member of a different group (guest). Is there a way to access this file?