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

1
vote
0answers
9 views

How To Quickly Switch Paths (in Bash)

Sometimes, usually when installing packages with brew, I want to disable/remove certain parts of my path, and then later restore them. I haven't been able to find an easy way to do this, and while I ...
1
vote
2answers
34 views

How to parse a space delimited text file

I have a text file like this: Fam1000: CMIN|CMIN_9-RA CMIN|ABC_7-RA GCLA|EFX5.1 GCUC|GCUC_7-RA Fam1001: GCLA|EFX6.1 GCLA|EFX7.1 Fam1002: GCLA|EFX5.1 GCLA|EFX2.1 GCUC|GCUC_8-RA GCUC|GCUC_8-RA Fam1003: ...
1
vote
3answers
2k views

“at” command not working

I wanted to schedule a job with at command and see this error: [root@labeir1 exm]# date Sun Dec 9 01:54:45 IST 2012 [root@labeir1 exm]# at 01:47 "df -kh" syntax error. Last token ...
0
votes
0answers
24 views

Linux - how to force the operating system doesnt go into maintenance mode

Is there any way to prevent or force a Linux System doesnt go into into maintenance mode when there is a system problem?. Example: In this case was for file integrity. Another opcion is if exist any ...
6
votes
3answers
5k views

Recursively chown all files that are owned by a specific user

Is it possible to find and chown all files that a specific user owns? I did a bunch of things as the wrong user and need to give the correct user ownership of the files. Is there a recursive and ...
1
vote
3answers
13k views

scp error: “Permission denied (publickey). lost connection”

I tried to scp an svn dump to savannah, but I got the following error at the end. Permission denied (publickey). lost connection The scp command and verbose output are below. Any ideas? ...
1
vote
0answers
19 views

How to convert .torrent file into magnet link?

I'm interested of converting a .torrent binary file into a magnet file. What are the possibilities to achieve that in Linux/Unix/OSX? Sample format: ...
3
votes
1answer
3k views

Need to copy a file from unix box to windows folder using pscp command

I have a unix svr A: username: uname password: pwd then there are some files under /usr/local/jboss/configuration which are accessible only when a 'sudo su' command is performed. (and the username ...
2
votes
4answers
85 views

What is a backslash colon doing in this chown command?

What is the \: doing in the command below? sudo chown nobody\: folder/ Is it some kind of mistake?
2
votes
1answer
37 views

UNIX, how to compare and transfer values between two text file

I have two text files with different number of columns in them and I want to compare values of a given column in file1.txt with values of a given column in file2.txt: if these values found in ...
2
votes
0answers
19 views

Why does Linux(and perhaps Unix) set the default chmod to 644? [on hold]

The 6 for the owner makes sense, and 4 for groups makes sense. But why can everyone read? It personally seems like an opening for potential misconfiguration.
1
vote
0answers
7 views

tcpdump - rotate capture files using -G -W and -C

I'm looking to be able to capture a rotating tcpdump output which captures 30-minutes worth of data, into 48 files, cyclically. The man implies this should be possible, but my testing doesn't seem to ...
1
vote
1answer
160 views

.tmux.conf: How can I conditionally set a color variable?

Sometimes I use a light-colored terminal, sometimes a dark one. I export a THEME environment variable to conditionally set colors in my .bash_profile and .vimrc. I'm trying to do the same in my ...
3
votes
1answer
3k views

How do I move a linked file on Unix?

I have a bunch of files in one directory and links to each one of those files in another directory. So ls -l looks something like this: lrwxrwxrwx 1 rembol rembol 89 Jan 25 10:00 copyright.txt ...
5
votes
4answers
5k views

What's the best way to perform a parallel copy on Unix?

I routinely have to copy the contents of a folder on a network file system to my local computer. There are many files (1000s) on the remote folder that are all relatively small but due to network ...
21
votes
4answers
14k views

Exclude hidden files when searching with Unix/Linux find?

What options do I need to use with find to exclude hidden files?
59
votes
7answers
165k views

ls-command: how to display the file size in megabytes?

In Unix (Tru64), how do I make the ls command show the file size in megabytes? Currently I am able to show it in bytes using the following: ls -la
1
vote
2answers
33 views

What is the difference between the processes listed by `ps` and `ps -A`?

What is the difference between the processes listed by ps and ps -A ?
0
votes
2answers
36 views

Is there any Unix window manager that looks like it is from a sci fi movie? [closed]

I woke up today with a weird desire to make my laptop look like those sci-fi movies where a hacker/IT guy can save the world using just a macbook ( -.- ). Anyway on all those movies you can notice ...
1
vote
1answer
18 views

Unix permissions error when working with symbolic link and MySQL installation

I'm working to install MySQL on one of our servers. I'm the ec2-user, and I'm attempting to install in the ec2-user home directory, but allowing access to the directory to the mysql user. However, ...
41
votes
4answers
79k views

If I know the PID number of a process, how can I get its name?

If I have the PID number for a process (on a UNIX machine), how can I find out the name of its associated process? What do I have to do?
0
votes
1answer
3k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
134
votes
17answers
69k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
-2
votes
1answer
18 views

File size is different in unix servers but count matches

I have a file in two servers like p01 and p11 ,both having same no of records but when i check the size both are different. Can anyone please explain me why it is like???
27
votes
3answers
17k views

Unix: How to unsplit in screen

I'm trying to learn how to use screen, in unix so that I don't have to open up several ssh connections and terminal windows just because I want to do more than one thing at the same time on a machine. ...
0
votes
0answers
16 views

Why the process of sleep command is always in sleep status?

Why the process of sleep command is always in sleep status ? Sleep status means waiting for I/O right ?
7
votes
3answers
5k views

Lightning bolt for prompt (PS1)

I've seen on a few screencasts a while back where someone had a lightning bolt instead of $ on the bash prompt. Does anyone know how to do this?
11
votes
4answers
1k views

Who deals with the star * in echo *

Who deals (interprets) the * in echo * Does the echo see the star or the shell take care about it and return a list of filename .. What about cp temp temp*
0
votes
0answers
11 views

shift all running process from user1 to user2

I have presently all my process running by user1 id on my server . Now we have a new user user2 and we want all the process running by user1 to run by user2. This is done for consistency as all other ...
0
votes
0answers
16 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 ...
28
votes
12answers
19k views

Is there a way to display a countdown or stopwatch timer in a terminal?

How can I display a real-time countdown timer on the Linux terminal? Is there an existing app or, even better, a one liner to do this?
1
vote
1answer
23 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
36 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
27 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
16 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
12 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 ...
22
votes
4answers
7k 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
7 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: ...
0
votes
1answer
18 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
1k 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
21 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
7k views

Setting timezone in AIX

The timezone is set to "CET" but date displays CEST $ echo TZ CET $ date Tue Apr 16 15:56:57 CEST 2013 Noticed the timezone on another similar system is "CET0" (not sure what the 0 means here!). ...
0
votes
1answer
8 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
10 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
16 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
10k 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 ...
2
votes
3answers
2k views

How to test stability of wireless router

I had a wireless router that would intermittently drop connections, so I had switched to using a different router. I have since updated the firmware on the problematic router. Is there an easy way to ...
3
votes
2answers
105 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?