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
0answers
25 views

UNIX Command to Determine Mac OS Version on a Specific HD

(For some reason, the DeployStudio forums aren't accepting new members at the moment, so I'm hoping you folks can help me out) I'm in the midst of exploring using DeployStudio for a series of test ...
1
vote
1answer
33 views

how to mount a network drive from specified network adapter in freebsd

I want to mount a network shared drive by my freebsd 9.3. I know This is possible by: mount_smbfs -I 10.1.1.20 //user@10.1.1.20/shared /root/local_folder/ This is done by default from em0. How can ...
1
vote
0answers
102 views

How do I install Nix on a custom directory?

I have been trying to follow the Nix wiki to install Nix on a custom path /scratch/gopinath/nix. The /nix path is not accessible to me due to the restrictions on the system provided by my university. ...
1
vote
3answers
3k views

Unix equivalent of XCOPY /D

Windows has a nice option to its XCOPY command: /D. This copies only files where the source modification time is newer than the destination time. Is there any unix/linux equivalent of this? I'm trying ...
0
votes
4answers
31 views

What issue exists when multiple lines of 'date' are used in bash?

I'm currently reading through a book on bash programming, Pro Bash Programming. At one chapter (Chapter 4) they ask what problem the following script has. I myself have no clue after reading through. ...
1
vote
1answer
27 views

Launch executable with custom root directory

How can I launch an executable so it thinks that the root directory is at a custom path, and not at the actual root. I thought it would be possible with sandbox-exec, but I haven't found any ways so ...
0
votes
1answer
18 views

iptables: Routing requests to localhost:8080 to google.com

I am trying a simple routing rule that would forward the requests to localhost:8080 to some external address (ex google). I added the following rule : sudo iptables -t nat -A PREROUTING -p tcp -d ...
25
votes
4answers
8k views

Powershell equivalent to unix `which` command?

Does powershell have an equivalent to the which command found in most (if not all) unix shells? There are a number of times I'd like to know the location of something I'm running from the command ...
0
votes
0answers
21 views

Java Runtime Exception: Unable to create lock manager

Hello when I run a script as root on unix shell it works, for example: sh -x /opt/auto/wso2is/bin/wso2server.sh However when I run it as a non root user I get the following error: ...
1
vote
1answer
22 views

How can echo the previous command I ran to a file?

I tried running echo '$(!!:p)' > /tmp/tmptxt.txt, however I just get $(!!:p). The previous command may have unescaped characters so I i need to escape it.
0
votes
2answers
2k views

Piping tail -f into awk

Greeting, I am trying to pipe tail -f into awk to monitor a logfile in realtime, but according to examples, there should be not problem but I can't get it to work. here is the command I'm running ...
0
votes
0answers
36 views

GNU tar and condensed sparse files

My version of tar doesn't appear to be able to make non-sparse files sparse, though cp does. Are some tar implementations capable of this? (This answer suggests that they may be.) $ dd if=/dev/zero ...
0
votes
1answer
19 views

Using chuser and stopudt without root

I am trying to create a user account that can preform certain commands via command line without having to login as root. The commands I want to run are stopudt, chuser, chpasswd. What I have tried is ...
0
votes
0answers
22 views

Printing unique lines with uniq, OS X Yosemite

I am trying to print the unique entries in a column of a .csv file. For this, I tried the following: awk -F "," '{print $6}' dataCoarse.csv | uniq -u which just prints the 6th column as it is. ...
-2
votes
1answer
112 views

ls -ltr command in UNIX and Linux - Behaviour

Why does ls -ltr show different total? We have same files in both unix and linux environment please refer BELOW UNIX > ls -ltr /A/B/C/ total 2140 -rwxr--r-- 1 demo demo 14415 May 30 ...
3
votes
6answers
11k views

Is it possible to run a program through FTP prompt?

I'm relatively new to Unix or shell scripting (a total novice to speak the truth), here is the deal: I have BI software that runs on a remote UNIX server. Through SAS client on Windows i run some ...
3
votes
3answers
1k views

Delete Directories smaller than x

How can I delete Directories which are smaller than, say, 1000 KB? I already have a file list from the command: du -sk * | sort -n > sort.txt but I don't know how to proceed. Update: du ...
3
votes
2answers
111 views

Number of groups for unix user limit change

In continuation of the question How Many Unix Groups Can A User Be A Member Of?: can I somehow change this limit?
1
vote
0answers
21 views

Set up multi-head environnement on FreeBSD running X.org

My goal is to set up a multi-head environnement: I need to have an extended desktop available on both screens with the ability to drag and drop windows from one screen to another. The left screen is ...
2
votes
3answers
3k views

gzip change file ownership

Here is a case I don’t understand. I have a group bar, and this group has two users; foo and bar. I have a test.txt file, foo is the owner and bar user only can read it. However, if bar user run ...
0
votes
1answer
45 views

Drive does not do “selftest” when using “smartctl?”

I have one drive which does not want to do the selftest: # smartctl -t long /dev/ada3 smartctl 6.2 2013-07-26 r3841 [FreeBSD 9.2-RELEASE-p3 amd64] (local build) Copyright (C) 2002-13, Bruce Allen, ...
69
votes
3answers
161k views

How can I make chown work recursively?

I've got a directory called pdfs that contains a bunch of sub- and sub-sub-directories. I want to change ownership on all PDF files in all of the subfolders. I just tried this: chown -R ...
38
votes
4answers
14k views

Bash: Spaces in alias name

I am trying to create an aliases in bash. What I want to do is map ls -la to ls -la | more In my .bashrc file this is what I attempted: alias 'ls -la'='ls -la | more' However it does not work ...
0
votes
2answers
36 views

How to handle duplicate files during runtime

we have a program which unzips a file and store the unzippied files in a directory. While unzipping, there may be a chance that the unzipped file come with the same name as we have unzipped as part ...
1
vote
3answers
1k views

How can delete all files except one from a directory?

I need to delete all files, except one (its name is defined), from a given directory. How can I do this from the terminal in OS X? Can I do this with one single command?
4
votes
2answers
3k views

Howto interpret SMART-Attributes?

I want to estimate the health and the remaining lifetime of my hard drive using SMART (in my case gsmartcontrol). However I don't know how to interpret the attributes. More specifically: Which ...
3
votes
2answers
1k views

sed, insert file before last line

The following inserting file method for sed used to be working, even before last line, but not any more. Is it a bug in the current sed? Demo of inserting file method with sed: mkdir /tmp/test ...
7
votes
4answers
6k views

List all unique extensions for files contained in a directory

I would like to see all the unique extension of files contained in a certain directory. What is the command to do that in bash? One could use find . -type f to get all the files in the current ...
0
votes
1answer
14 views

Running time of locating a file in a directory

When you search for a file in a directory with a large number of files (n), what is the worst case running time of locating this file? I mean does the OS (linux) sequentially check all filenames in ...
-4
votes
1answer
28 views

Owner and User in Linux [closed]

I am facing issue with permission in Linux. I would like to know the difference between User and Owner of a particular file and directory, if its a non root user in linux. Please help.
0
votes
1answer
37 views

Get the Group name which has GID=0

I wanted to write a shell script in which it needs to give the group name whose GID=0.I used awk command like this, awk -F ':' {$3==0} /etc/group | cut -d ':' -f1 It works fine in redhat,aix.But ...
1
vote
0answers
32 views

Deny access to a specific folder for a sudo user

So here is the case: I am root in an Ubuntu system. I want to give a user (say username is X) permission to execute any command but at the same time I have a folder that I want no one to be able to ...
0
votes
0answers
16 views

How do I add printer to AIX menu choices. (Unix operating system)

I need help assigning an alias name (printer name in menu) to a printer already installed in root mode on AIX 5.3/Unix operating system. I have added ip address and host name to etc/hosts already. I ...
0
votes
1answer
29 views

What do the parameters in update alternatives install mean

I need help in understanding the following parameters "/usr/bin/java" "java" ""/usr/java/latest/bin/java" 1 in the following command. update-alternatives --install "/usr/bin/java" "java" ...
1
vote
3answers
13k views

How to copy a file from unix to windows machine, from commandline

How to copy a file from unix machine to windows machine, from commandline.
0
votes
1answer
81 views

No such file or directory when executing an existing file

I have norrowed the error down to this from a larger script and I'm getting the error "No such file or directory" when I try to execute a file which exist and I have the correct permissions for. ...
4
votes
1answer
17k views

How to change user in WinSCP?

I'm using WinSCP to access Unix computers. How can I change user after I have logged into a Unix server using WinSCP? E.g. I have personal account in Unix computer A. I can log into this computer ...
2
votes
1answer
190 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
0
votes
0answers
61 views

Can’t cd, ls, chown/mod or rm directory — Unknown error: 211 in Mac OS X

Never seen something like this in all my years. This is happening in Mac OS X: $ ls -lO@ea dr-xr-xr-x 2 root wheel - 1B Mar 20 23:10 Music/ $sudo cd Music/ cd:13: unknown error: ...
1
vote
1answer
72 views

How to correct malfunctioning Terminal in Mac OS X?

I am using Mac OS X 10.10.2 (Yosemite)—not a server version of the OS—and standard “Terminal” commands like ls, sudo, cp, mv, rm are no longer recognized in my Mac “Terminal.” I face this problem ...
56
votes
3answers
67k views

What is the Windows equivalent of the Unix command cat?

I want to do exactly what unix "cat" does, but on my PC. Is there a simple equivalent command for the Windows command line? Specifically I want to create a file from all the files of a given type in ...
2
votes
3answers
165 views

Apparent .bash_profile and .profile conflict in Mac OS X

I have an issue where, when I load up new terminal windows, I have to source the ~/.profile to get my PHP path working correctly. In essence of my issue is getting terminal to use MAMP PHP and MySQL ...
0
votes
1answer
23 views

how to add all the integers between two lines with a pattern and print

I have an input file (sample.txt) Sat 02/28/2015__19:32:37.63 262,404 K 100,964 K 112,052 K 124,628 K Sat 02/28/2015__19:37:38.41 262,408 K 100,964 K 112,056 K Sun ...
4
votes
3answers
2k views

How to tar.gz everything but .jpg/gif/png/wmv/flv/tar.gz/zip?

how do I tar.gz everything apart from jpg/gif/png/wmv/flv/zips, recursively, via the Unix shell?
1
vote
1answer
37 views

How to mount a device without a password

I am using the following command in a script to mount a device. However whenever I run it, it prompts for a password. sudo mount -t cifs //xxx/lon-hsv/BT/APPOPS/Qlikview /mnt/appops -o ...
2
votes
3answers
10k views

Installing “SoX” (Sound eXchange) via the Terminal in Mac OS X

I’m new to installing applications via the “Terminal,” so excuse my absolute ignorance on the subject. I want to install SoX (Sound eXchange), so I can do some ninja audio editing. First I installed ...
20
votes
6answers
20k views

tar – extract discarding directory structure

unzip has a nifty option -j, whereby the directory structure of the archive is discarded, and all files are extracted into the same directory. Is there a way of making tar work in the same way? ...
0
votes
2answers
194 views

Ctrl+Z and fg to append commands

I would like to know what is the behaviour of Ctrl+Z and fg in bash when wanting to append commands to be executed after a running command has finished. For example, in the sequence for commands ...
14
votes
4answers
22k views

finding L2 cache size in Linux

I wanted to know how to find L2 cache size in Linux... for L1 cache size, I am doing the following pico /proc/cpuinfo what about L2 cache size?
0
votes
1answer
84 views

How can I disable FTP access for users

I want to temporarily disable the FTP Access of the FTP users which are added from Cpanel I have tried chsh -s /sbin/nologin aadmi which says "chsh: user "aadmi" does not exist." Tried sudo echo ...