Debian Configuration :: Bash Seems Messed Up - Use "locate" To Find Files

Aug 16, 2010

Forever I've been able to use "locate" to find files, but now it finds NOTHING at all and I have no clue why.. I tried apt-get install locate and it installed it, but it's not working in bash.

View 5 Replies


ADVERTISEMENT

General :: Bash - Using Find Or Grep To Locate Filenames With Accented Characters From A Different Encoding System (Windows)

Dec 6, 2010

I tried to tag late onto a question similar to mine on stackoverflow (Find Non-UTF8 Filenames on Linux File System) to elicit further replies, with no luck so far, so here goes again... I have the same problem as the OP in the link above and convmv is a great tool to fix one's own filesystem. My question is therefore academic, but I find it unsatisfactory (in fact I can't believe) that 'find' is not able to find non standard ascii characters.

Is there anyone out there that would know what combination of options to use to find filenames that contain non standard characters on what seems to be a unicode FS, in my case the characters seem to be 8bits extended ascii rather than unicode, the files come from a Windows machine (iso-8859-1) and I regularly need to fetch them. I'd love to see how find and/or grep can do the same as convmv.

[Code]....

View 2 Replies View Related

General :: Find Command In Locate Pdf Files?

May 25, 2010

My goal is to find all pdf files on a remote machine, so I resort to the useful command find. So I type find .pdf or find .pdf" and I get nothing. I do the same on my machine and I get nothing. I do a regular search from the menu on my machine and I find quite a few pdf files. Would somebody please tell me what am I doing wrong?

View 5 Replies View Related

Debian Configuration :: Unable To Locate Package Pop3d ?

May 17, 2011

I have some problems to start my dovecot server on Debian 6.0.1 I tried to install it from webmin using "un-used modules" but it was allways the same error: "E: Unable to locate package dovecot-pop3d".

When I tried to install it from console using the commands: apt-get install dovecot-imapd dovecot-pop3d dovecot-common - and there are no problems with dovecot-imapd and dovecot-common, but still the same error with dovecot-pop3d: "E: Unable to locate package dovecot-pop3d".

I did apt-get update ant apt-get upgrade but I'm receiving still the same error when I want to install pop3d.

It's interesting because there were no problems to install and run dovecot server on earlier versions of debian.

View 2 Replies View Related

General :: Bash: Find Folders With Less Than X Files?

Sep 18, 2010

How would I go about finding all the folders in a directory than contain less than x number of .flac files?

View 2 Replies View Related

Programming :: Bash Find Files On Time Help?

Mar 11, 2011

I am trying to find a nightly backup if it was successfully copied over, rename it and curl, but it's always passing the check even if the file is older than specified. From the command line it does as it should. Example is here;

Code:
find /backup -type f -mmin +4440 -exec echo "found" {} ;
- nothing returned (good). Then I change the time

[code].....

View 4 Replies View Related

General :: Find The Bash Source Files Of Programs In Mac OSX?

Jan 6, 2011

I am currently writing some convenience methods for my terminal in my bash_profile and am sure if what I am writing is "the best way". I figure a good way to verify whether what I'm doing is right or not would be to find some source code of more established programs and see how they do it.My question then is, where can I find this code on my Mac? An example is, with Macports installed, where is the source code that opens the port interactive console when I type nothing but "port" in my shell?(I added Linux in the title even though I am on a Mac because I assume the answer would be the same for both)

View 3 Replies View Related

General :: Find Duplicate Files Using Bash Script ?

Jun 8, 2010

What kind of method to find the duplicates files on linux,

1.how to find just using the file name, sometimes i figure out people often to copy their files to another directory and i want to find out if there any same file name in the linux box.

2. what about if i want to find the duplicate files based on contents of the file, example is in picture file if users store picture files from digital camera first they just save the file name in default but when they want to give that picture to others they will rename it, i've been used method md5 for this situation in python script but it takes long time

I'm asking this question just to know to use bash script a lot in work and i want to test out fdupes at home, is fdupes use similar md5 scan to find duplicate files?

View 4 Replies View Related

Programming :: Find The Files With Extension .h Or .c With Bash Scripts?

Feb 3, 2011

i want to find all files with .h or .c extension and print them on the screen. How can i do it with bash script programming?

View 5 Replies View Related

General :: BASH: Find Duplicate Files (MAC/LINUX Compatible)?

Mar 18, 2011

I am looking for a bash script which is compatible with Mac, to find duplicate files in a directory.

View 2 Replies View Related

General :: Bash - Command To Find Files Changed In Last N Seconds?

Jun 21, 2011

Linux command to find files changed in last n seconds. shell script,that we can run from cli or command.

View 3 Replies View Related

Programming :: Bash Script To Find Newest Files And Count Them?

Feb 25, 2010

I'm working on a bash script that will go through a directory, find the sub-directories that have been created since the last time the script ran, count the results, and output that integer (will most likely be '1' or less per each instance run) to a file. Give the circumstances, my previous (and very limited) experience with bash is not sufficient for me to pull this off. since it probably has bearing, is that my mail server stores files that it flags as viruses in a folder. It creates a sub-directory for each virus that it quarantines .I want to count those subdirectories and graph them with MRTG. Hence the script. I'm going to post what I've got so far and the purpose of it, because I'm told I have a very odd and efficient way of doing scripting.

[Code]...

But then it dawned on me that it wouldn't work because I would have to not count the directories that have already been counted and count the ones that have not been counted. Given that the purpose of this is to generate a graph about every 5 minutes, using find won't work because, to my knowledge, that will only find things based on whole day values, I need it almost down to the minute.

View 1 Replies View Related

Ubuntu :: Write A Bash Script Which Will Find Files Then Move Them To A Specific Directory?

Sep 1, 2011

I'm trying to write a bash script which will find files then move them to a specific directory.

So far I have:

Code:
#!/bin/bash
#script to find and move files
src_dir="/path/to/source/directory"
des_dir_mov="/path/to/destination/directory/for/movies"
des_dir_img="/path/to/destination/directory/for/images"
find $src_dir -iname '*.avi' -type f -exec mv '{}' $des_dir_mov ';'

I'd like to have all the possible movie file types then the image file types checked in a loop.

Every time I try to include an array in this script it breaks

View 3 Replies View Related

Programming :: Bash Script To Find And Remove Similar Lines From Multiple Files?

Jun 5, 2009

I want to remove duplicate or multiple similar lines from multiple files. I.e. if I have four files file1.txt file2.txt file3.txt and file4.txt and would like to find and remove similar lines from all these files keeping only one line from these similar lines. I only that uniq can be used to remove similar lines from a sorted file.

View 9 Replies View Related

OpenSUSE Install :: How To Find Kdm Configuration Files

Aug 9, 2010

I'm trying to find kdm configuration files where I could add post user login script to execute. I just cannot figure out what files are read and executed at what time. I'm trying to load ICC profile after user login. I needs to be executed by root before starting users KDE/Gnome/... session. Loading ICC profile requires running X, so /etc/init.d would not work. Setting s bit on a script run by user is the last resort due to obvious security implication. ... produced nothing useful. I would know what to do in older SuSE versions. In Ubuntu I'd put it in /etc/gdm/PostLogin/Default ...

View 1 Replies View Related

Debian :: Find >> Remove Strings With Bash?

Aug 22, 2010

i'm trying all the time to use this (find,sed gnu,..etc) scrip to find and remove this string in all files *.php in wwwbackup/ directory. the script work without any error, but doesn't remove any thing!?

find /home/usr/wwwbackups/ -type f -name *.php -print0| xargs -0 sed 's#echo "<iframe src="http://internetcountercheck.com/?click=2255046" width=1 height=1 style="visibility:hidden;position:absolute"></iframe>";##g' -i

how can i become this script working?

View 8 Replies View Related

Software :: Console / Bash Configuration In Debian?

Nov 13, 2010

I'm trying Debian again just for fun after using Slackware for years. When I "su -" on Konsole in Debian I get this for my prompt:
Code:
darksaurian@darkswamp:~$ su -
Password:
darkswamp:~#
darkswamp is my hostname that I made up when I installed. On Slackware I'm used to it saying:
root@darkswamp
or something like that.
I'm starting Konsole the same way on both:
konsole -e $SHELL -l
I kind of wish it still said "root" just because I'm used to it.

View 5 Replies View Related

Debian :: "locate" Is Locating Files That No Longer Exist (have Recently Deleted)?

Jul 23, 2011

"locate" is locating files that no longer exist (I have recently deleted).How can I 'flush' locates cache?

View 5 Replies View Related

Fedora Security :: Find A Tool To Track Configuration Files Changes?

Mar 30, 2009

I am trying to find a best tool to track configuration files changes. I did find some information about osec and mactime, but, it seems, that they are not included in fedora/rpmfusion package databases. is there any tool that can be installed as a package?

View 8 Replies View Related

Ubuntu :: 'locate' 'updatedb' Bash: Command Not Found?

Jul 5, 2010

I recently installed 10.04, in the process of installing MythTV... I'm looking for installed files and find bash no longer finds updatedb or locate commands. I did change /etc/hosts and /etc/hostname to change the name of the box. Could this have hosed those commands? I tried them as root... sudo -i, same result...

View 6 Replies View Related

Programming :: Bash Script To Locate A Specific File?

Jun 14, 2010

I'm new to bash scripting and I've searched around the forums and Internet for this but haven't had any luck. I've found similar things but not what I need. What I need to do is write a simple script that uses what the user inputs to locate and display where a file is. I would prefer to use locate instead of find since I know that the person I am writing this for has locate on her machine (my mom, who is just beginning with Linux).I'm writing the script to make things easier for her while she learns In this particular part of the script I would like to be able to have the script prompt to enter the file she is searching for, read the her input and then display for her where the file is. I realize it would in most cases be much simpler just to teach her how to use locate, but she is very impatient and this is just a part of the script I will be writing, but I can't figure out how to do this.

View 6 Replies View Related

Software :: How To Write Bash Script To Locate File

Aug 5, 2011

I mean codes on how to write a bash script for locate file. E.g: This utility shows you all files and directories that have a specific substring in the name. Press '?' for help, 'q' for quit or enter your search terms:

Kuala bin
I have searched for two terms for you,
Kuala, which has three hits:
/usr/share/zoneinfo/Asia/Kuala_Lumpur
/usr/share/zoneinfo/posix/Asia/Kuala_Lumpur
/usr/share/zoneinfo/right/Asia/Kuala_Lumpur bin, which has 2312 hits.
Are you sure you want to see all of those? [Y/n] n
Press '?' for help, 'q' for quit or enter your search terms:
Sorry, you didn't enter any search term.
Press '?' for help, 'q' for quit or enter your search terms: q

View 8 Replies View Related

Debian Configuration :: Change Prompt Color In Bash Shell?

Jan 13, 2010

I am getting more and more comfortable working with the shell, thus I would like to change its prompt color to my liking, as it will be easier for me to distinguish commands vs. outputs.

I've read a couple of instructions of how to change the .bashrc file and am familiar with what the codes in PS1 mean. Except, this file can be intimidating to newbie eyes.

Where exactly on the file is it that I need to make the change?

Here is what I am trying to do. I would like my prompt to like exactly like the prompt I use in Backtrack - which consist in two different colors, one for the host and another for the pwd. Here is what the Backtrack .bashrc file looks like:

# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/local/share/man:/usr/bin/man:/usr/share/man
export HOSTNAME="`cat /etc/HOSTNAME`"

[Code]....

I also read that in order to have the same results when I log in as root, I will have to copy the modified .bashrc file into /root

View 8 Replies View Related

Ubuntu Networking :: Messed Up Network Configuration

Jan 29, 2011

I`m relatively new to Linux and Ubuntu.Now I have been playing around, editing the settings files for the networks cards, and now I have messed things a bit up.Any way to delete all settings, and make Ubuntu autodetect my hardware again?

View 3 Replies View Related

General :: Locate Directory And Change Permissions In Bash Script?

Aug 13, 2011

i am trying to write a script that does the following..1. checks if a directory exists2. changes permisssions of the directoryi have written a script but it returns a message to say that the specified directory does not exist (but it does).my question is how to i search the entire file system as directory could potenially be anywhere. would cd or su be of any use here.

View 4 Replies View Related

General :: Different Between 'locate' And 'find'?

Oct 14, 2010

Why there are two so similar command in Linux? and normally what are the circumstances to use each of them?

View 2 Replies View Related

Red Hat / Fedora :: How To Find / Locate It

Apr 9, 2010

I would like to know if I want to vi /proc/sys/net/ipv4/ip_forward, but assume that I don't know the path of ip_forward, is there a way to tell where is it?

View 3 Replies View Related

Ubuntu Installation :: Installations Got Messed Up - Programs Don't Find Path To Run

Jan 14, 2010

I have this weird problem. The other day I asked a question about restore the backup file after dual boot installation. I have done the dual boot ( XP installed first) then restored the backup file. Now the problem is that I forgot if I excluded system files from backup or not, so when I restored and rebooted, my installations got messed up, many programs do not find their path to run, etc. But the real problem is when I rebooted again, I got error 15: file not found tried to follow some other posts here to solve this and noticed that running fdisk -l gives me:

[Code]....

View 1 Replies View Related

Fedora Networking :: WLAN Disconnected - Network Configuration Messed Up

Jul 20, 2009

Recently, I had the courage of installing Fedora 11 on my laptop while risking of trashing my Windows XP. Fortunately, the installation went fine and windows and fedora seems to be working together. But I needed to reinstall Fedora because I didn't do the partitioning right. After that the problem arises. I couldn't connect to the wlan. The first installation it was working fine. Now I can't. I select the network, enter the password and then it just says "Disconnected" or something like that then nothing else happens. So I had to reinstall it again thinking I did something wrong on the installation. But still it wasn't working. But it seems to be working when I boot from the live cd. I must have messed up my network configuration.

View 7 Replies View Related

Fedora :: 11: X Windows Configuration Gets Messed Up After Reboot (X Server Crashing)

Aug 12, 2009

I recently installed Fedora 11 on my machine, the configuration of which is: Intel Core i7 920 CPU, 3 GB DDR3 SDRAM, nVidia GTX295 Graphics Card. I initially used the default kmod-nvidia driver, but with a yum update, somehow a non-PAE kernel got installed and the kmod-nvidia driver did not get installed with it during the update for some reason. So I uninstalled the PAE kernel and associated kmod drivers, and downloaded the nVidia driver from the nVidia website. It ran just fine for a few days, and then all of a sudden, after a reboot, the X Server crashed and I had to log into the text mode, run

Code: setup and do the default X configuration. Then, I re-installed kmod-nvidia, with no luck. Sorry for being so vague about this, but I finally managed to get the CUDA driver (I need to use CUDA for my project work) to work (downloaded from [URL]). But after one reboot, the same problem resurfaced.

Now, I am in X Windows with a default 800x600 configuration using a generic visa driver, on a 23" monitor I have been rebooting my computer all morning and trying various things to get the driver to work again. I would be happy to furnish any details about the installed packages I have. For now, here is some information.

[Code]....

View 14 Replies View Related







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