Problem is, there are 3 files that I remove many times a day and would like this command to ignore these 3 files. In other words, prompt me on everything EXCEPT these 3 files.
Yes, it's possible. It's not exactly trivial to get right, because you could be passing in both files from the excluded set and other files at the same time. But let's just figure you usually delete only one file at a time.
This declares a function (instead of an alias) which assumes your regular rm is in /bin/rm -- if it's in /usr/bin/rm or elsewhere, you need to adapt the command. The variable ask is set to "-i" and then conditionally, if there is exactly one argument, and if that one argument is one of your three files (change the list to hold your exceptions) then set ask to the empty string. Then, unconditionally run the regular rm, with whatever value $ask has now, on the arguments.
Quote:
Can I modify the color scheme? So that it only affects me, not everyone else?
The ls manual page mentions a variable LS_COLORS which you can set or modify in your own .bashrc. It won't affect anybody else; everybody have their own .bashrc. GNU file utilities has detailed documentation (for some version of GNU ls). It seems the regular documentation is what dircolors -p prints, and the manual doesn't explain it in too much detail.
Last edited by era; 04-21-2008 at 02:21 PM..
Reason: Actually, look at dircolors -p output
Hi,
for example in this script I want both of these files to be listed with my "ls" command but it won't work, is there a way to do it like this I've tried &, ||, |, etc.
This seems so simple but I can't figure it out.
I thought with "&&" it would work but I was wrong!
#!/usr/ksh
touch... (7 Replies)
hi @all
question from an absolute beginner:
I want directory listings to be displayed with different colors...
what do I have to do and where can I find the settings?
thx (4 Replies)
When I telnet (ssh) over to my Fedora system, I find the colors horrible. For instance, regular files are white text, which is fine, but directories show up as dark blue which is virtually invisible against the black background). Additionally, when using vi, I find the colors great doing perl... (3 Replies)
Hi ,
I have a situation.
Need is to create & send a formatted file with header in BOLD & colored & some sequel results as a content.
I know echo -e \033 command, but its scope is limited in PUTTY.
How to retain the formatting out of Putty; say after someone opens a email attachment... (2 Replies)
Hi,
I was instructed to find all the .bashrc files on my system, that MODIFY the PS1 varaible.
here is what i've come up with so far:
ls / .bashrc -print
woo.
But thats not all. I need to display the full file name ( Including the full path ) and protection.
- I can display... (4 Replies)
Hi,
Currently in my company, we are using Windows 2003 server and Exceed. Team from India can connect to the Windows 2003 server and start Exceed to run their UNIX application. The application is GUI based.
As you know, Windows 2003 only allows two connection at any time. so I want to... (3 Replies)
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
I've seen in other programmers code the use of '_&' as a line separator. I am trying to find in my C++ reference manual some pages dedicated to an explanation of the use of this '_&' but I don't know what it is called. I only know it is a "line separator" or "line break" of some sort which is... (0 Replies)
Hi Guru's.
I am trying to use to check if $5 is greater than 80 & if not 100, then to print $0 :
awk '{ if ($5>80) && if ($5 != 100) print $0}
But getting error:
>bdf1|sed 's/%//g'|awk '{ if ($5>80) && if ($5 != 100) print $0}'
syntax error The source line is 1.
The error... (6 Replies)
What I want to do is not unique, except that our environment has a twist.
I want to ssh to a remote server and issue a sudo command to run a script. This isn't working, but you'll get the gist.# ssh remotehost sudo -i -u oracle script.bashThe sudo to oracle is fine. The script.bash sets up the... (4 Replies)
Discussion started by: JustaDude
4 Replies
LEARN ABOUT DEBIAN
dircolors
DIRCOLORS(1) User Commands DIRCOLORS(1)NAME
dircolors - color setup for ls
SYNOPSIS
dircolors [OPTION]... [FILE]
DESCRIPTION
Output commands to set the LS_COLORS environment variable.
Determine format of output:
-b, --sh, --bourne-shell
output Bourne shell code to set LS_COLORS
-c, --csh, --c-shell
output C shell code to set LS_COLORS
-p, --print-database
output defaults
--help display this help and exit
--version
output version information and exit
If FILE is specified, read it to determine which colors to use for which file types and extensions. Otherwise, a precompiled database is
used. For details on the format of these files, run `dircolors --print-database'.
AUTHOR
Written by H. Peter Anvin.
REPORTING BUGS
Report dircolors bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report dircolors translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for dircolors is maintained as a Texinfo manual. If the info and dircolors programs are properly installed at your
site, the command
info coreutils 'dircolors invocation'
should give you access to the complete manual.
GNU coreutils 8.12.197-032bb September 2011 DIRCOLORS(1)