10-15-2009
I'm sure that somebody will come up with a one line command, but...
You could do it with 3 commands.
Rename labtest to any other name , then delete all files labtest* and then rename the file back to labtest.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0.
Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ?
I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc.
... (1 Reply)
Discussion started by: sameerdes
1 Replies
2. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
3. Shell Programming and Scripting
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Red Hat
Dear All,
plz print the path of files which have the script of "who" & "w" commands.
thnx in advance. (6 Replies)
Discussion started by: saqlain.bashir
6 Replies
6. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
7. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
8. UNIX for Beginners Questions & Answers
Hi All,
I have 2 pipe delimited files viz., file_old and file_new. I'm trying to compare these 2 files, and extract all the different rows between them into a new_file.
comm -3 < sort file_old < sort file_new > new_file
I am getting the below error:
-ksh: sort: cannot open
But if I do... (7 Replies)
Discussion started by: njny
7 Replies
9. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
BEAV(1) General Commands Manual BEAV(1)
NAME
beav - binary file editor and viewer
SYNOPSIS
beav [file...]
DESCRIPTION
This is a brief description of the minimal set of commands that are necessary to start using beav effectively. For more information,
review the file /usr/share/doc/beav/beav140.txt.gz.
The file-visit command, Ctl-X Ctl-V, can be used to read a file in for editing. The file can also be read in from the command line; beav
<edit_file>.
Data is displayed in one or more windows. These commands can be used to navigate around the windows.
move-back-char Ctl-B moves left
move-back-line Ctl-P moves up
move-forw-char Ctl-F moves right
move-forw-line Ctl-N moves down
window-delete Ctl-X 0 delete window
window-expand Ctl-X 1 expand window
The move-to-byte command, Ctl-X G, will prompt you for a byte position to move to.
These commands will insert a zero byte at the cursor position or delete the byte at that position.
insert-unit Ctl-X I
delete-forw-unit Esc D
The file-save command, Ctl-X Ctl-S, will save the data to the file if a change has been made.
The help command, Esc ?, will display a list of all commands and their current key bindings.
The abort-cmd command, Ctl-G, will abort any command that is in operation.
The quit-no-save command, Ctl-X Ctl-C, will exit beav. If there is any data that has not been saved you will be warned.
FILES
/usr/share/doc/beav/beav140.txt.gz
BEAV(1)