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.

Filter by
Sorted by
Tagged with
28 votes
2 answers
23k views

Can I call pushd/popd and prevent it printing the stack?

After calling pushd/popd in bash, it will print off the current directory stack. Is there any way to prevent this behaviour, so that it will act 'quitely'? This sort of noise in a command is uncommon ...
Amandasaurus's user avatar
  • 32.3k
19 votes
6 answers
15k views

Git - post-receive hook with git pull "Failed to find a valid git directory"

It's very weird but when setting a git repository and creating a post-receive hook with: echo "--initializing hook--" cd ~/websites/testing echo "--prepare update--" git pull echo "--update completed-...
zanona's user avatar
  • 345
1 vote
2 answers
3k views

Is it a good idea to chmod my Python site-packages directory to 777?

I use Python on Linux and OS X, and I'm trying to think of a good reason not to chmod my Python site-packages directory to 777. It seems like that is better to do than sudoing every time I want to ...
Jason Baker's user avatar
  • 1,219
5 votes
2 answers
10k views

UNIX - How to give user rights over another user and so I don't need to sudo or type password?

I have 2 users in question • git user - used for gitosis - so it's a No password user and it can be accessed only through root... • user user - where my files reside so what I would like to do is ...
zanona's user avatar
  • 345
1 vote
4 answers
9k views

Create file with variable value in Unix

How can I create a file in unix or linux based on variable value ? Ex: If I store date in a variable in linux, YESTERDAY=`date --date='1 day ago' '+%d-%m-%Y'` it will store value to YESTERDAY as ...
Kumar's user avatar
  • 823
3 votes
1 answer
2k views

snmpwalk: Supressing the "Wrong Type (should be xxx)" when loading a custom mib

I'm using some custom mibs but for some items I get a message like: $ snmpwalk -c enterprise -v 1 -M mib -m ALL host iso.3.6.1.4.1.5485.2.10.111.1.1 ... MYCOMPANY-MIB::rejectedMessages.11 = Wrong ...
user avatar
0 votes
1 answer
485 views

Determine group of unreadable unix/linux directory

dcoles1@shovel:/ $ cd /DriveXT dcoles1@shovel:/DriveXT $ ls . unreadable dcoles1@shovel:/DriveXT $ cd /DriveXT/MML/ dcoles1@shovel:/DriveXT/MML $ ls . unreadable dcoles1@shovel:/DriveXT/MML $ ...
Dan's user avatar
  • 155
24 votes
9 answers
60k views

Make ls print it all on one line (like in terminal)

ls prints differently depending on whether the output is to a terminal or to something else. e.g.: $ ls . file1 file2 $ ls . | head file1 file2 Is there some way to make ls print out on one line ...
Amandasaurus's user avatar
  • 32.3k
54 votes
6 answers
41k views

Bash Loop - How to stop the loop when I press Control-C inside a command?

I am rsyncing a few directories. I have a bash terminal open and am executing something like this: for DIR in * ; do rsync -a $DIR example.com:somewhere/ ; done However if I want to stop the whole ...
Amandasaurus's user avatar
  • 32.3k
23 votes
4 answers
34k views

How big (in bits) is a Unix UID?

I understand that unix user IDs (UIDs) are usually 16 or 32 bit unsigned integers but how can I find out for any given system (in a shell)?
Josef's user avatar
  • 393
60 votes
1 answer
44k views

rsync - Exclude files that are over a certain size?

I am doing a backup of my desktop to a remote machine. I'm basically doing rsync -a ~ example.com:backup/ However there are loads of large files, e.g. wikipedia dumps etc. Most of the files I care a ...
Amandasaurus's user avatar
  • 32.3k
2 votes
6 answers
444 views

Last command issued on a GNU/Linux box

Someone asked at the mailing list of my local LUG if there is any way of learning the last command issued on a GNU/Linux system. We're talking last command in a system-wide fashion I guess. After ...
gnrfan's user avatar
  • 171
0 votes
1 answer
842 views

Why can't I successfully install mysql server?

It's very easy. All I want to do is this: aptitude remove mysql-server mysql-server-5.0 --purge aptitude install mysql-server But when I try to run that I get this error: root@db2:/etc# aptitude ...
Alex's user avatar
  • 8,591
2 votes
2 answers
680 views

A more useful MySQL Query log that's suitable for tail -f'ing

In order to debug a webapp and mysql queries, I've enabled the mysql query log. However it's not a very good format to tail and grep through. Ideally I'd like to be able to only show queries from a ...
Amandasaurus's user avatar
  • 32.3k
4 votes
3 answers
2k views

xargs --max-proc split output per proc?

I recently discovered the xargs --max-procs feature. How can split the output of the command by proc? Should I just create a mycommand --logfile $LOGFILE, or can I do it from xargs itself? An ...
Gregg Lind's user avatar
2 votes
1 answer
1k views

Does smbfs create constant inode numbers?

If I use smbfs to mount a filesystem, will the inodes always be the same for each file? Or am I in danger of the inodes changing when I mount the fs again or if the remote system reboots?
user avatar
0 votes
1 answer
554 views

How to "distribute" memcached?

I know how to install and use memcached on one server. But I heard you can "distribute it"? How does that work, and how can I enable that feature?
Alex's user avatar
  • 8,591
5 votes
2 answers
448 views

Please explain the following o/p of "top" command

Please explain the following line from the "top" command in the bold : Mem: 1026228k total, 449640k used, 576588k free, 44812k buffers Swap: 1052248k total, 2020k used, ...
user avatar
4 votes
7 answers
14k views

Top 10 Skills for a System Administrator?

I want to apply for an entry-level position in System Administration (Unix/Linux, Lighttpd, MySQL). I have extensive private experience but almost no on-the-job experience. What are, in you opinion, ...
user avatar
2 votes
2 answers
2k views

make noise on redhat when command is finished

i am developing some software with a significant build time, so i want to execute the build command and play a noise once it is finished. two questions: how do i make some noise from the command ...
aaron's user avatar
  • 751
0 votes
1 answer
2k views

Get all files using FTP via Unix Terminal

Using the FTP command in the Unix terminal I want to download all files / folders from my FTP server. When I use this command: ftp> mget * I get lots of these errors: ftp: Unable to determine ...
Ben Everard's user avatar
3 votes
5 answers
337 views

How do I keep track of all IPs that logs into my UNIX computer?

I am using Ubuntu. Is there a good system that can do this?
Alex's user avatar
  • 8,591
11 votes
2 answers
5k views

unix user alias

is there a way to set up user aliases in unix such that if you have a user, my_user, they can log in with an alternate username, i.e. my_user_alternate and still be logged in as my_user?
aaron's user avatar
  • 751
1 vote
2 answers
236 views

Selective syncronisation of two directories in UNIX (Solaris)

I'm wondering if anyone knows of a nice way to partially duplicate (hard link) files between two directory structures? My current fall back is a script invoked by cron. As background: I ask since I ...
Tom Duckering's user avatar
1 vote
2 answers
956 views

CRON job erratic behavior with Bourne shell script

I have the following script, that runs normally when I type the script name at the prompt (logscript): #!/bin/sh dvar=`date +"%m\/%d\/%y"` filedate=`date +%b%d%Y` echo DSS1 > serverlog_${filedate}....
Lance Roberts's user avatar
0 votes
2 answers
4k views

Bash & blocking processes

Could you help me with the Bash syntax to achieve the following? Run a blocking process without blocking execution of the rest of the script. Run a standard "non-blocking" process (e.g. lsof). "...
xyz's user avatar
  • 501
5 votes
2 answers
6k views

Updating a file in a zip archive from STDIN

I want to update/freshen a file in a zip archive with the contents of stdin. So far I haven't been able to find a way to tell the zip command that the contents of stdin correspond to a particular file....
Bo Jeanes's user avatar
  • 1,530
0 votes
2 answers
3k views

SSH not redirecting stdout to local terminal

I have the following relevant lines in a csh script: #!/bin/csh -xv set dvar = `date +"^%m\/%d\/%y"` set filedate = `date +%b%d%Y` set grepstring = "grep "\"$dvar\"" </home/user/log/logfile" set ...
Lance Roberts's user avatar
11 votes
4 answers
27k views

Problem with Postfix

I have Postfix installed and Sendmail is not running. I try to send mail using mail but the following warning comes up and the mail doesn't get sent: postdrop: warning: unable to look up public/...
Chetan's user avatar
  • 315
-1 votes
4 answers
15k views

Best IRC Server & Services? (Debian) [closed]

Using Debian (Lenny) here all update to date and such and I'm looking to setup an IRC server (I've done it before) Just wondering whats the easiest to setup. I'm looking for something thats also ...
EpicDewd's user avatar
  • 135
1 vote
2 answers
391 views

Sync server time

I have 3 servers and each one of them is showing different time. How do I correctly set the SAME time across all severs? I noticed that ntpd server is stopped. So I started it. service ntpd start Is ...
shantanuo's user avatar
  • 3,619
6 votes
7 answers
663 views

*nix measure memory usage

i'd like to measure the total memory (like RAM) used by a program during its execution. Ideally, something like time that runs the program and print stats when it exits. Is there such a standard tool ...
pistacchio's user avatar
5 votes
5 answers
11k views

useradd with 755 permissions

I d like to set the home directories permissions as 755 when i add the user via useradd. How can i do this? Thanks.
user30597's user avatar
  • 234
3 votes
2 answers
121 views

Access rights escalation requiring multiple sysadmin authorisation

I was just wondering if there is a way to give a user root access escalation on a *nix system, kind of like sudo, but which requires more than one sysadmin authorisation. I am thinking of something ...
sybreon's user avatar
  • 7,425
0 votes
2 answers
759 views

Why can't I uninstall mysql completely? look! it's still there

root@db2:/var/log/mysql# aptitude remove mysql-server --purge Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing ...
Alex's user avatar
  • 8,591
0 votes
2 answers
150 views

Should the Tomcat standalone http server be stopped after you've setup the apache http server?

I'm going to set up my linux server (ubuntu) with Apache and Tomcat. I've seen the documentation about setting up the tomcat connector for apache, but the thing I don't understand is that shouldn't ...
Marplesoft's user avatar
0 votes
4 answers
561 views

Troubleshooting httpd in Linux

I have a small personal site hosted on Unix (using a common hosting account). My experience with Unix is limited (too bad). Recently I set up a httpd server running on port 8082 (not Apache - but an ...
user avatar
2 votes
2 answers
2k views

SSH certificate authentication for the user without home directory

I have access to Solaris box over ssh and can login with username and password. I want to write a script which would copy files from that box unattended (scp/sftp from cron). Usually in such case I ...
maximdim's user avatar
  • 133
1 vote
2 answers
189 views

How to get a man page for manually compiled software?

I'm using Mac OS X and I manually compiled llvm and clang because they were not available from MacPorts (a package manager). I presume clang has some kind of man page. How do I install and/or ...
xyz's user avatar
  • 501
9 votes
2 answers
3k views

should use sudo or just su root in server management?

Which approach is better? For desktop usage, it seems that sudo is better since: I can have a more consistent history as a normal user Don't need to remember two passwords, which is especially true ...
weakish's user avatar
  • 211
0 votes
1 answer
91 views

Monitoring User Account Time

Is there a good way (on networked *nix systems) to keep track of how much time user accounts have been logged in on a daily/weekly/monthly basis? Also, it would be cool if I could set adjustable time ...
singpolyma's user avatar
0 votes
2 answers
140 views

Monitoring Network Useage

I have a server (running Ubuntu, but I can put a BSD/Solaris or other distro on if that helps) running beween my LAN and my sattelite modem (basically acting as a router). I would like to track ...
singpolyma's user avatar
1 vote
3 answers
370 views

Memory Usage by UID (Unix)

I need the best way to get the SUM of the total RAM usage for a given UID (Unix).
user29964's user avatar
  • 111
2 votes
1 answer
7k views

Error : Could not find End Of Central Directory

I am trying to deploy a war on weblogic9 using an ant task on a Unix box. I am getting the following error :[wldeploy] Error opening file [file path] Could not find End Of Central Directory.The war ...
dsr's user avatar
  • 141
16 votes
4 answers
26k views

Specify default group and permissions for new files in a certain directory

I have a certain directory in which there is a project shared by multiple users. These users use SSH to gain access to this directory and modify/create files. This project should only be writeable to ...
mislav's user avatar
  • 263
32 votes
2 answers
7k views

Linux/Debian - What does 'pee' in moreutils do?

I recently discovered the 'moreutils' package in Debian (and Ubuntu). It's a collection of convenient unix tools. One of the commands is 'pee'. The man page says: pee is like tee but for pipes. ...
Amandasaurus's user avatar
  • 32.3k
4 votes
2 answers
4k views

Can't start Java, error: Could not reserve enough space for object heap

I'm trying to get Solr up and running. At first I had the JDK.1.6 working fine, then tomcat running fine too. All of a sudden when trying to run Solr for the first time however I get the error message:...
bluedaniel's user avatar
14 votes
2 answers
5k views

unix sort treats '-' (dash) characters as invisible

a file with lines (aa ac a-b) unix sorts to (aa a-b ac) instead of the expected (a-b aa ac) it is as if sort is ignoring the '-' character. interestingly, a dash by itself is sorted correctly (a b ...
user avatar
0 votes
1 answer
119 views

Reference network file in command line with SSH protocol

I'm trying to reference a file in the command line, but I keep getting the 'No such file or directory' error. The system uses SSH for the protocol. Examples (that cause error): grep regex <...
Lance Roberts's user avatar
2 votes
1 answer
15k views

Grep date with regex

I have files with lines in the following formats: . . . 12/16/09 17:56:30.211 rest of line... . . . 12/17/09 05:34:10.809 rest of line... . . How do I grep the lines out of this file that are ...
Lance Roberts's user avatar

1
31 32
33
34 35
40