Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
List all files in ~c12100 directory beginning with "BOZO" that end with either "123" or "456"
2. Relevant commands, code, scripts, algorithms:
find or locate commands using [ ] and -o
3. The attempts at a solution (include all code and scripts):
find ~c12100 -type f \( -name "BOZO*" -name "*123" -o -name "*456" \)
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Washtenaw Community College, Ypsilanti, MI, Jim, C121
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
---------- Post updated at 08:46 AM ---------- Previous update was at 08:43 AM ----------
3. The attempts at a solution (include all code and scripts):
find ~c12100 -type f \( -name "BOZO*" -name "*123" -o -name "*456" \)
I'm trying to delete lines from a large text file using VI.
Every line that I am wanting to delete start with 'S' - all others do not. (A list of users)
I've tried using * but doesn't seem to like it...any ideas...
Doesn't have to be VI - but I'm better with VI than sed/awk. (8 Replies)
I was wondering what the difference was between the two commands, I understand that locate won't search for files with certain permissions set. Are there any others?
Thanks (1 Reply)
when writing a shell script (bourne) and using a unix command like 'ls' is there anything special you need to do to use a wildcard (like *)? (3 Replies)
ok, I'm trying to write a script file that lists files with specific elements in the name into a txt file, it looks like this
ls s*.dat > file_names.txt
can't figure out whats wrong with that line, any ideas?
thanks in advance (10 Replies)
I am digging for certain types of files in the current directory and all its sub-directories and archiving them with the following code:
#! /usr/bin/ksh
Archive=`date +%Y_%m_%d_%T`
find . -type f \( -name \*\.ksh -o -name \*\.sql -o -name \*\.ini \) -print|xargs tar -cf... (4 Replies)
I need to add code to a shell script to find out if a string matches any item in a list, where the list can contain a wildcard character.
For example, if I have the following list:
ok_versions="03-02-4, 04-01-*"
Then I want to compare a particular string to see if it matches any item in... (11 Replies)
These 2 websites do a GREAT job of explaining different types of wildcards. I learned about the categories of characters which I never knew about at all.
GNU/Linux Command-Line Tools Guide - Wildcards
GREP (1 Reply)
Platforms : Solaris 10 and RHEL 5.6
I always get double quotes , single quotes and asteriks mixed up for find, ls and grep commands.
The below commands retrieve the correct results. But , unders stress , I get all these mixed up :mad: .So, i wanted to get a clear picture.
Please check if... (7 Replies)
greetings,
below is the find command i am using for some filesystem maintenance:
find /data/Engine \( -type d -name .snapshot -prune -o -type d -wholename "/data/Engine/*/CAE" \
-prune -o -type d -wholename "/data/Engine/*/CAD" -prune -o -name ".*.case" \)\
-mtime +365 -print0 -fls... (5 Replies)