The tag has no wiki summary.

learn more… | top users | synonyms

16
votes
3answers
2k views

Why is there a difference with Unix date between 2 and 3 months

How is this possible and how do I deal with it? I'm making backup script that is dependent on Unix date and have discovered an interesting bug: [root@web000c zfs_test]# date +%y-%m-%d --date='2 ...
1
vote
1answer
42 views

curl is giving wrong result via ssh

Curl is working fine on the node itself: [ec2-user@smokebase1 ~]$ curl -s -I --retry 3 --header 'Host: smoke-base.dev-test.com' ...
2
votes
5answers
273 views

debian bash/sh string execution

I am stuck with this piece of code here user@server:~$ TEST="ssh rsync@otherserver.example.org 'date; hostname -A; uname -a'" user@server:~$ $TEST bash: date; hostname -A; uname -a: Command not ...
4
votes
2answers
170 views

supress expansion of * in echo

I am working on a script which dynamically executes some queries on daily basis. These queries are coming from a table in the database. Here is the sample output of the query table: ...
-1
votes
1answer
58 views

can someone help me pick out the particular field? [closed]

I have to generate a script that alerts me when disk space goes beyond a threshold. df -k command would fetch me the disc spaces involved in my working directory. For example,the output would be ...
-1
votes
1answer
266 views

UnknownHostException in Unix while using InetAddress.getByName() [closed]

I use this snippet of Java code to lookup an IP Address from the domain name InetAddress address = InetAddress.getByName("google.com"); It works fine in Windows & Linux but throws ...
0
votes
4answers
94 views

Seeing what background process is up to

I currently have a background process on my unix server that's running hours longer than it should be. I can't remember the command to allow me to see the output of a background process. I'll ...
1
vote
1answer
456 views

How to combine files with unix cat command based on file name, then rename?

I have a bunch of CSV files in a directory like: modfinalak_1.csv modfinalal_1.csv modfinalal_2.csv modfinalal_3.csv modfinalar_1.csv modfinalar_2.csv so it's one or multiple files per each US state ...
0
votes
4answers
173 views

is there an 'upwards' find?

To find files starting from a certain path, I can use find <path> .... If I want to find 'upwards', i.e. in the parent directory, and it's parent, and..., is there an equivalent tool? Intended ...
1
vote
1answer
226 views

Simplest way to output file ages instead of filedates by ls?

What is the simplest way to output file ages instead of filedates by ls command? Like "1 hour", "2 days", "3 weeks", etc. (Sometimes file age is much more significant than date)
-4
votes
2answers
88 views

What are some useful and popular monitoring commands/tools for linux web/server? [closed]

I usually use htop and tail -f syslog. I am running ubuntu/nginx/memchache/php5-fcgi/varnish
2
votes
1answer
489 views

'ls' taking a long time to list 20 subdirectories

I have a directory (my_dir) which has 20 sub directories. Every time I run 'ls' or try to autocomplete a file name in this directory my IO usage goes to 100% and it takes very long time (10 mins) to ...
0
votes
2answers
440 views

Less or more command on Solaris for paginating output

When I type "ifconfig | more" or "ifconfig | less" the output isn't paginated on Solaris (I'm used to Linux and FreeBSD). Is there a way to do this on Solaris 11?
2
votes
4answers
3k views

Is there a Unix-type command to kill all processes with a certain name?

I run a script called "delayed_job" for a Ruby on Rails application. One of the options is to run this proc with a separate monitor proc. When the main proc dies, the monitor will spawn a new one. I ...
3
votes
2answers
203 views

Macbook / Linux Octal Dump on a Directory [closed]

I'm reading "The Unix Programming Environment". Its discussion of directories makes frequent use of the od command to get an octal dump of a directories' contents. But at some since 1984, usage of ...
0
votes
2answers
85 views

Deleting Files which have a certain name

can someone steer me in the right direction. I have 2GB worth of images, which include 3 types. Eg: thumb-12345.jpg popup-12345.jpg 12345.jpg Is there a quick script/command I could run to ...
3
votes
3answers
2k views

How to read the “IDLE” column in the output of the Linux 'w' command?

I'm trying to figure out a process that monitors users sessions on a remote server and alerts them when they are being idle too long, which with the Linux command w is aptly appropriate. Problem is ...
1
vote
1answer
343 views

Cut last 500 lines from logfile

I want to cut the last 500 lines from a logfile and save it to a new file. Is there any unix command for this?
0
votes
4answers
3k views

Absolute path with ls?

How can I make the ls command show a file's full path instead of just its filename? With all its options, there must be a way, right?
2
votes
2answers
6k views

Alternatives to CURL, WGET

Is anyone aware of any alternatives to curl and wget? The key functional requirement I'm looking for is to be able to execute an HTTPS GET request against a known URL. The reason I'm looking for an ...
0
votes
2answers
411 views

remotely running find -exec options

I'm trying to setup a bash process for deploying my django project onto a linux server. Through cygwin, I'm running a script that is calling scp to copy my files over. Is there a similar command to ...
1
vote
1answer
95 views

du -sh keeps timing out!

i need to get the entire size of /storage, but using du -sh times out after about an hour! is there another way to get the entire directory size?