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.
1,957
questions
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 ...
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 ...
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 ...
0
votes
1
answer
482
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 $ ...
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 ...
54
votes
6
answers
40k
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 ...
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)?
59
votes
1
answer
43k
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 ...
2
votes
6
answers
443
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 ...
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 ...
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 ...
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 ...
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?
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?
5
votes
2
answers
445
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, ...
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, ...
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 ...
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 ...
3
votes
5
answers
326
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?
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?
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 ...
1
vote
2
answers
953
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}....
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).
"...
4
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....
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 ...
11
votes
4
answers
26k
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/...
-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 ...
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 ...
6
votes
7
answers
657
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 ...
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.
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 ...
0
votes
2
answers
757
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 ...
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 ...
0
votes
4
answers
560
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 ...
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 ...
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 ...
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 ...
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 ...
0
votes
2
answers
139
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 ...
1
vote
3
answers
369
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).
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 ...
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 ...
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.
...
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:...
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 ...
0
votes
1
answer
118
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 <...
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 ...
0
votes
1
answer
338
views
Why is it that during my replication (master-slave), it keeps inserting data, then deleting data, then inserting data?
I followed this tutorial for master-slave replication: http://www.howtoforge.com/mysql_master_master_replication
Basically, this is what I did.
Uninstalled mysql on both servers. Installed mysql on ...
1
vote
5
answers
2k
views
Why is the disk space taking up so much,? It doesn't make sense
I ran this command:
root@aa:/# du -h --max-depth=1 /
du: cannot access `/proc/4002/task/4002/fd/4': No such file or directory
du: cannot access `/proc/4002/task/4002/fdinfo/4': No such file or ...
0
votes
8
answers
6k
views
What could be eating up my entire hard drive space ? (650GB)
I only have a database , which is around 40G.
I did have some problems with replication earlier....could it be some sort of log/files that are eating it up?
How do I check why the space is taken up?
...