All Questions
19 questions
0
votes
1
answer
10k
views
Where to find the website folder in ubuntu server?
So someone gave me the task to find where is the website code exist on ubuntu server
when I look at the the index.html file path it is
/var/www/example.com/html
but when I go to /var/www directory I ...
0
votes
1
answer
631
views
How can I search for symlinks that point to other symlinks? [closed]
I have morass of chained symlinks like this scattered around:
A (symlink) -> B (symlink) -> C (file)
Some may even involve longer chains, I'm not sure yet.
When manually examining a single file ...
0
votes
1
answer
411
views
Cron to find multiple file types and automatically delete them
I am trying to put together a command that will find multiple file types and automatically delete them. I want to run this in a cron every 10 minutes on my server.
I would like to find files of type: ....
0
votes
2
answers
688
views
Windows search cannot find files in current directory
We have a windows server 2012 r2 that has the file server role and windows search installed.
The drives with the shared folders are indexed and the shares folders are mapped on all clients.
I can ...
0
votes
1
answer
49
views
find: equal file size limit but different unit returns different result
I noticed that the these two commands to list files below 5 GiB produce different results:
find . -type f -size -5368709120c
find . -type f -size -5G
Specifically the one that uses kilobyte unit (...
4
votes
1
answer
6k
views
Linux Find File with Exact Size
In the Linux command line, how can I find all files exactly 158 kB in size? I was using the following command but it didn't work:
find /var/www/ -xdev -type f -size 158k
0
votes
1
answer
83
views
Grep a textfile with (find generated) files, but ignore paths
I receive a huge textfile generated with find.
The contents of the generated textfile are a file-referenes with full path, i.e.:
//server/dir1/dir1foobar.ext
//server/dir1/dir2/dir1bar.ext
//server/...
2
votes
3
answers
13k
views
linux: find files from a list in txt, the files contain spaces
I need to find files from a list in txt (i already have the txt with all the files, are separated with lines), the files contain spaces and the extension of the files are pdf, if you can suggest how ...
5
votes
1
answer
14k
views
How can i manipulate the find command to "find" the directories the "found" file is in?
So i'm trying to use the find command to find all files in my system with mtime -x. It does this but it does not "find" the directories of the file.
find . -mtime -2 -exec rsync -av {} /destination/ ...
1
vote
1
answer
1k
views
Find and replace files in linux
I know how to find and replace certain string through files, but I'm interested how could I find and replace whole files? e.g. I would like to find all info.php files that were modified at specific ...
1
vote
0
answers
262
views
Clarifying what modifies atime and the impact the find command might have
So on a regular basis I clear out files from my server which have an atime +160 with a command such as: (technically to delete old files but avoid any file that might have been accessed recently)
...
48
votes
6
answers
232k
views
Move files to another directory which are older than a date
I am looking for a solution to move files that are year older from today. My log partition is getting full, but I can not remove them. They are needed for a long long time. Anyway one solution I came ...
2
votes
1
answer
455
views
finding files that match a precise size: a multiple of 4096 bytes [duplicate]
I have several drupal sites running on my local machine with WAMP installed (apache 2.2.17, php 5.3.4, and mysql 5.1.53). Whenever I try to visit the administrative page, the php process seems to die....
1
vote
1
answer
1k
views
How does find command sort results?
I have an old messy shell script. One of the steps executes find command with some parameters and expects the results to be sorted by creation time. It works well on old machines (find version is 4.1....
2
votes
1
answer
2k
views
How to find files with trailing slash in linux
I have some files in the filesystem that end with a trailing slash like so:
my_text_file_1.txt\
some_other_file_2.pl\
I usually use find for these cases, but the following did not work:
find . -...
3
votes
3
answers
3k
views
How to use find to replace several files of the same name
I have several files of the same name (say, somefile.php) scattered within several directories under /var/
If I want to replace all of them with a new version of somefile.php located in, say, /home/...
46
votes
3
answers
136k
views
How to view hidden files using Linux `find` command
On a Linux server, I need to find all files with a certain file extension in the current directory and all sub-directories.
Previously, I have always used the following command:
find . -type f | grep -...
3
votes
2
answers
4k
views
Linux - A more fine grained -mtime for find?
find is a great tool for finding files. It has the option to find files that were modified in the last X days with -mtime. However I'd like something more fine grained than that. I want to be able to ...
15
votes
7
answers
71k
views
How to Find a file in FreeBSD
I'm trying to locate all copies of example.filename on my FreeBSD server. What's the best / easiest / most efficient way to do this?