11-24-2011
Unix commands, help please!!
Hi im stuck trying to find command lines for a few questions
i need a command line to find and remove the largest file (without having to manually type the name of the file) please help!?
a)Im also struggling to find a command to left justify all text in a file.
b)and to be able to remove all blank lines.
Both a and b need to be seperate commands.
Thanks in advance and thanks for your consideration,
SynGc
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Where can I get a list of basic commands ? I want to get up to speed as soon as possible ? thanks..... (4 Replies)
Discussion started by: drukkie
4 Replies
2. UNIX for Dummies Questions & Answers
I want to know if there is a way to send unix commands thru FTP from a mainframe to kick off Autosys Jobs. I just need to send a command from the mainframe to UNIX and have UNIX execute that command. (2 Replies)
Discussion started by: skammer
2 Replies
3. UNIX for Dummies Questions & Answers
I would be happy to streamline some of the commands I am trying to learn with easy to remember terms, like dir for ls -l. I am wondering if you script certain commands for every time you start-up your system, can use those aliases there? If so, would that prove a problem for administrators who... (2 Replies)
Discussion started by: wmosley2
2 Replies
4. HP-UX
HP 9000/800 Server running HP-UX UNIX Server, users are connected via LAN and dialup connection.
Need help to write SHELL SCRIPT or UNIX Commands which would perform the following:
-ping IP address of all login/connected users to our server
-send customized text message to all the login... (1 Reply)
Discussion started by: Moinul Haque
1 Replies
5. UNIX Desktop Questions & Answers
What is the unix command that will display the current UTC time, hours, and minutes only.
What is the unix command for sorting in descending order.
What is the unix command for display the first 10 characters in a file. (4 Replies)
Discussion started by: charlton
4 Replies
6. UNIX for Dummies Questions & Answers
I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked.
Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies
7. UNIX for Dummies Questions & Answers
i want to know how to do a few things using unix commands.
firstly say I have a .txt file that contains random lines like
Hello
Goodbye
I'm tired
5
74
using the grep command how can I get a list of lines that contain ONLY digits?
also using pipes to combine ls and grep commands how... (5 Replies)
Discussion started by: ez45
5 Replies
8. UNIX for Dummies Questions & Answers
Hello Folks
Where can I find all the unix commands with explanations , on the internet. I am searching but most of the sites are listing a few of the important ones. PLease guide through
thanks (4 Replies)
Discussion started by: supercops
4 Replies
9. UNIX for Dummies Questions & Answers
What are the various commands which use $ in unix and what do each of these indicate? eg: echo $? returns the success status of the previous commands..similarly $$ returns some numeric value..wat exactly are these?
From where can a download a document which can help me getting more details about... (2 Replies)
Discussion started by: DDS
2 Replies
10. UNIX for Dummies Questions & Answers
Having trouble doing the following things, I know it has something to do with using metacharacters but I'm not able to get it working correctly.
I need a command to get a long directory listing of all the files that have:
exactly two characters following the letters zot.
all files that... (1 Reply)
Discussion started by: lakers34kb
1 Replies
LEARN ABOUT CENTOS
whereis
WHEREIS(1) User Commands WHEREIS(1)
NAME
whereis - locate the binary, source, and manual page files for a command
SYNOPSIS
whereis [options] [-BMS directory... -f] name...
DESCRIPTION
whereis locates the binary, source and manual files for the specified command names. The supplied names are first stripped of leading
pathname components and any (single) trailing extension of the form .ext (for example: .c) Prefixes of s. resulting from use of source
code control are also dealt with. whereis then attempts to locate the desired program in the standard Linux places, and in the places
specified by $PATH and $MANPATH.
OPTIONS
-b Search only for binaries.
-m Search only for manuals.
-s Search only for sources.
-u Only show the command names that have unusual entries. A command is said to be unusual if it does not have just one entry of each
explicitly requested type. Thus 'whereis -m -u *' asks for those files in the current directory which have no documentation file,
or more than one.
-B list
Limit the places where whereis searches for binaries, by a whitespace-separated list of directories.
-M list
Limit the places where whereis searches for manuals, by a whitespace-separated list of directories.
-S list
Limit the places where whereis searches for sources, by a whitespace-separated list of directories.
-f Terminates the directory list and signals the start of filenames. It must be used when any of the -B, -M, or -S options is used.
-l Output list of effective lookup paths the whereis is using. When non of -B, -M, or -S is specified the option will out hard coded
paths that the command was able to find on system.
EXAMPLE
To find all files in /usr/bin which are not documented in /usr/man/man1 or have no source in /usr/src:
$ cd /usr/bin
$ whereis -u -ms -M /usr/man/man1 -S /usr/src -f *
FILE SEARCH PATHS
By default whereis tries to find files from hard-coded paths, which are defined with glob patterns. The command attempst to use contents of
$PATH and $MANPATH environment variables as default search path. The easiest way to know what paths are in use is to add -l listing
option. Effects of the -B, -M, and -S are display with -l.
AVAILABILITY
The whereis command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils
/util-linux/>.
util-linux March 2013 WHEREIS(1)