General :: 'all Files' Switch For Grep - Including 'hidden'?

Jun 14, 2010

If I type 'grep alias .bashrc' a whole load of stuff comes up. However, if I type 'grep alias *' nothing comes up. Is there some switch for including 'hidden' files - like the -a switch for ls?

View 2 Replies


ADVERTISEMENT

CentOS 5 :: Move Contents Of A Directory Recursively Including Hidden?

Mar 9, 2010

I have a directory: /var/www/html/something/

and it's got tons of files and directories, some containing hidden files.

I want to move all the contents of something including hidden files up to the site root at: /var/www/html/

What is the proper command for this?

View 4 Replies View Related

General :: Possible To Delete All The Files Including System Files As Root?

Sep 21, 2010

If I am logged in as root in a linux system and I run command rm -rf on / folder, should it remove all the files? also the kernel?

View 4 Replies View Related

General :: Recursively Cp All Directories, Files And Hidden Files?

May 17, 2010

Ubuntu 10.04

I want to copy all directories, files, and hidden files and hidden directories with one command. I want these items to replace any same items in the target directory.

I have tried several things, such as:

cp -r *
cp -aR *

but I only seem to get visible files and directories. Obviously, I am missing something. (A brain, probably....)

View 9 Replies View Related

General :: Delete Hidden Files I Have 2 In My PC?

Feb 10, 2011

What should do? Or how to delete that I have 2 hidden in my PC?
I know nothing that's why please tell me detail if some one know about it?

View 5 Replies View Related

General :: List Only Hidden Files?

Feb 15, 2010

how to list only hidden files in current directory ?

View 7 Replies View Related

General :: Can't Access Windows Hidden Files

May 23, 2011

I had Windows on my machine but I decided to try Ubuntu 11.04. I kept my partitions where I store music, movies and stuff and it is OK, I can open anything, but I can't open the files that were in a hidden folder. I see then, I can browse my Windows hidden directories, but I can't open the files!

View 15 Replies View Related

General :: How To Delete Multiple Hidden Files

Mar 17, 2010

I am using ubuntu 8.04 and have a separate home partition. While setting it up I had a few failures and was left with several directories containing many hidden files which I can't seem to delete. The man pages for 'rm' didn't seem to provide the answer either.

Is there a flag or escape sequence that will allow 'rm' to delete these files?

View 8 Replies View Related

General :: View Hidden Files In Ubuntu 11.04?

Jun 26, 2011

Is there a way to make the system display hidden files in the home folder when you open it? I know you can select "Show Hidden Files" in the view menu but having to do this every time you want to see or access hidden files and folders is annoying!

View 2 Replies View Related

General :: Hidden Files In Disk Usage Analyzer?

Aug 18, 2010

How do I get Ubuntu's "Disk Usage Analyzer" to show me the hidden files?

It tells me my home dir uses 3GB, but only accounts for 525MB (the results of du -shc *). Can I get it to show me the other files that are using the space?

View 4 Replies View Related

General :: 'find' Command Regex To Exclude Hidden Files?

Jun 28, 2010

I have the following command which finds all files that have changed in the last day and lists them. How can I exclude hidden files like .bash_history?

View 3 Replies View Related

General :: How To Remove Rwx Permission For Group And Other Users For All Hidden Files

Nov 29, 2010

How would i remove rwx permission for group and other users for all hidden files (except . and ..) inside /root using a one line command.

View 4 Replies View Related

General :: Get Files That Match ALL Patterns (using Grep)?

Jun 9, 2010

I want to traverse a directory and get a list of files that contain a set of patterns. I assumed I could use grep for this, but I having trouble getting grep to only return files that match ALL patterns. Here's what I've come up with so far:

Code:

grep --recursive --file=searchpatterns.txt --files-with-matches somedirectory/*

However, this gives me a list of files that match ANY of the patterns in the searchpatterns.txt file. I want to match ALL of the patterns. I've looked through the man page, but can't find anything that allows me to change the "OR" to "AND" for multiple patterns.

View 5 Replies View Related

General :: Searching For PHP Files With Find And Grep

Nov 2, 2010

I am looking for all the files that contain the text string 'moo.sql'. I ran the following:

find . -name '*.php' | grep -lir 'moo.sql' *

Unfortunately it seems to return non-php files in addition to php files. I thought the find portion of this would filter the file names so grep would only search php files.

View 3 Replies View Related

General :: Making Grep Find Files Containing '$'

Dec 5, 2010

I want to find files containing the "$" char (ascii 0x24). 'Grep -irl $ *' would output the names of every file in path *, of course, because it means end of line (EOL). So giving grep the string "$" won't do. So I tried 'grep -irl $ *'. But this doesn't work either and I do not understand why. Am I not escaping the dollar sign? grep should interpret it literally. Neither 'grep -irl "$" *' will work. Fortunately, there's LQ, besides grep's man page.

View 9 Replies View Related

General :: Awk / Grep Or Sed - Find And Replace Recursively From Files

Feb 12, 2010

I am new to linux as well as awk, grep or sed. I need a find and replace command single liner or script that loops trough input file (file1) and find the particular input in file2 and add "!" in front of the found string.

Example:
input file: file1
g+h=o+p
a+b=c+d
file2 (file that need to look for)
a+b=c+d1e105
x+y=z+s5e105
g+h=o+pabcdefg
t+r=w+qxvyderf

Output file (file3 should look like this)
!a+b=c+d1e105
x+y=z+s5e105
!g+h=o+pabcdefg
t+r=w+qxvyderf

I have tried many awk and sed method of find and replce but it did not work the way I wanted. This is mainly due to my lack of experience in awk and sed. The program should loop trough file1 and find in file2 and output in file3 for the 1st (g+h=o+p) set then repeat the same process again for set 2 (a+b=c+d).

View 14 Replies View Related

General :: Grep -- Finding Files That Contain Two Separate Strings?

Dec 9, 2010

I've got a quick grep question. I'm trying to work out a command I can use to locate all of the files in a directory that have sql database connection details. I want to do it by looking for the strings "localhost" and the name of the database.find . -type f -exec grep -l -E '^(localhost|DATABASE_NAME)' {} ;

View 4 Replies View Related

General :: Grep Command - Show The Files But Not The Line Count

Oct 31, 2010

This has to also show the line count. I can get it to show the files but not the line count. What is the single command used to identify only the matching count of all lines within files under the /etc directory that contain the word „HOST? List only the files with matches and suppress any error messages.

View 4 Replies View Related

General :: Use Grep Command To Filter The Log Files Created Between 3:00 PM To 4:30 PM In Buch?

Dec 13, 2010

I would like to know how to use grep command to filter the log files created between 3:00 PM to 4:30 PM in buch of log for whole day in different headings. This files resembles like sar file in linux.

View 5 Replies View Related

General :: Grep String From Logs Of Last 1 Hour On Files Of 2 Different Servers+calculate Count?

Sep 3, 2010

I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows:

Code:

27-Aug-2010 10:04:30,601|919122874903|phtunes_app|1282243292627|NotifySmsReception|DMGenerateLogInterceptor - ExternalTransactionID:SDP-DM-26713018, TransactionStatus:Requested
27-Aug-2010

[code]....

View 6 Replies View Related

Ubuntu :: After Files Deleted Still Shows Up As Full - Shown In Hidden Trash Files

Mar 9, 2011

I have a Kingston 8gb Datatraveler that has been giving me troubles lately. For some reason after I delete files from it it still shows up as full and the files are shown in the hidden trash files. How do I get rid of these files? I can't delete them as they just show back up. Also, I tried to format the drive with gparted and it won't unmount. When I right click and select information, at the bottom it says: Unable to find mount point. Unable to read the contents of the file system. Because of this, some operations may be unavailable.

View 1 Replies View Related

Programming :: C++: Not #including Files?

Jun 16, 2010

I'm trying to make my program as small as possible. Currently it's down to 17.8 KB, but I'd like to get it smaller (I know, I'm insane). Is there a way to not use the "#include" directive to include the entire header, but rather to just load only the stuff I need? For example, I just want to include 'sprintf' and 'printf' from stdio.h, not the entire header. Is this possible? Or am I misunderstanding some fundamental element here?

View 14 Replies View Related

Red Hat / Fedora :: Simple Backup HD Including All Files?

Feb 20, 2010

I am somewhat new to Linux and I am looking for a way to back up my HD with all my Linux files. I have a Toshiba laptop running Windows 7. The HD has been partitioned so that the computer can run Red Hat Scientific Linux. Using Grub I can dual boot to either Windows 7 or Linux on start up. I want a simple way of backing up the entire contents of my HD (both partitions - everything) - so that in the event of my laptop being damaged I can reconstruct my set up and data as before with all my files and settings in both Windows 7 and Linux intact. Is there a simple program that will enable me to copy everything to an external HD for back up. Can anyone recommend a package that will do this?

View 5 Replies View Related

Ubuntu Servers :: Backup Including System Files - Boot From Live Cd?

Apr 22, 2010

I am researching how to make an effective backup on Ubuntu Server. This server will have Vsftp, VPN, Samba stuff , many other added packages +many printers, many users + data. I know I can use tar for the data /u no problem. 1. I was testing tar on the /home directory on a few user directories. I then created a new directory and did a restore of the users directories on it. I noticed the /home/user owner and group were root. The files in each directory remained the same. This gave me concern. If I had a crash and had to restore these to a new HD. I would have to change these, what else would I need to change? 2. Since I have many config files, how do I back up them? I know I can do a dump, but then users shouldn't be on the system. The system files will change as they add users, printers, etc, and asking users to not work, is not really an option while dump is running. I thought I could do a tar on whole system. (cron late at night .. not as many users) Then in event of crash of HD.

1. Boot from live cd
2. format the new drive
3. tar back in the whole system

Will this work right? Is there something I am missing?

View 3 Replies View Related

Ubuntu :: Uninstall (including Any Config Files) And Reinstall The Windows Manager

Jun 11, 2011

I've destroyed my desktop.

I'm using Ubuntu 11.04 and I would much like to uninstall (including any config files) and reinstall the windows manager.

Is there a set of commands I can run to achieve this?

View 1 Replies View Related

General :: "Argument List Too Long" - Deleting Files Based On Grep?

Jan 28, 2011

I've got a directory with thousands of files and I want to delete those that contain specific text.When I try:Code: ls | grep -l "specific text" * | xargs rm I get the error: Code: /bin/grep: Argument list too long Is there an easy way to get around this without having to move files into seperate folders and processing them in batches? I found an article on getting around this problem, but I'm kind of new to Linux and don't know how to apply this to my specific problem.

View 3 Replies View Related

General :: Find/grep/wc Command To Find Matching Files - Print Filename And Word Count?

Sep 11, 2009

I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:

wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;

View 10 Replies View Related

Ubuntu Multimedia :: Find "hidden" Mp3 Files (incomplete Files Or Just Rubbish)

Jan 26, 2010

I've got a collection of MP3 files, but sometimes I stumble across a double file in Rhythmbox. At first, I thought they were the real files, but after trying to fix the tags (artist names were incorrect or missing) in tag editor, I didn't see any change in the files in Rhythmbox.

This made me search for the album in which the files were (in Rhythmbox). I found out that these incorrectly named files were doubles, but they didn't show in the actual folder.

So, I deduced, They had to be fakes. I threw the doubles in the trash bin, and there it was. They were hidden files (with a dot in front).

How can I find all these hidden files, so I can remove them?

View 3 Replies View Related

Software :: Rename Hidden Files / Rename All Files With A Leading Decimal Point Recursivley?

Jul 25, 2011

How would I rename all files with a leading decimal point recursivley? I some how got all my music files to have a decimal point.I tried the below and got a " sed argument to long".[CODE]find /media/MUSIC -type f -name "*.wma" | xargs -0 sed -i 's/.(.*)/1/'[CODE]

Another question, can i just use -type f with out -name ? I am sure that all the files got the decimal point added as the first character.

View 14 Replies View Related

Debian :: Globbing And Hidden Files In Zsh

Mar 10, 2011

This really doesn't make sense to me:

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved