i want to move files and directory to a folder called deleted on my home directory. I want to mimic rm -r command.. i made this code and it only moves all the files from the directory but don't mv the directory. please help i tried everything that can to my mind.
Code:
#!bin/bash
function removeDir () {
if !
OS: RHEL 5.8
shell: bash 3.2.25
Directory /home/guest/ contains these files:
file a
file b
file c
fileD
fileE
fileF
testFile.txt
I'm trying to find the syntax to run
Code:
ls -ltr
against this list of files that is contained within a text file, testFile.txt.
The file testFile.txt has the contents below, with file names within quotes and with files space delimited.
"/home/guest/
I'm trying to copy a file from the home directory to the current directory( which is a subdirectory of a directory in home) using .. and . instead of path names or ~
This is what I tried, but it didn't work:
cd ..
cd ..
cp file .
Any help would be appreciated.
I recently thought it would be a good idea to start hiding files and folders and encrypting things. All was going well until curiosity struck me. I wondered while I was staring at my Desktop and I was in my Desktop directory in the terminal looking at the files on my Desktop.
I have a directory that have zillions of files. As soon as I try to copy this directory, I receive a message that a file could not be copied (corrupt ?) and the copy stops.
Is there any command I can type on terminal that can check all files on that directory tree and list all files that could not be copied or that are corrupt?
Code:
flamingo:~ joliver$ sudo find / -nogroup
find: /dev/fd/4: No such file or directory
find: /home: No such file or directory
find: /Library: No such file or directory
find: /net: No such file or directory
find: /Network: No such file or directory
find: /private: No such file or directory
find: /sbin: No such file or directory
find: /System: No such file or directory
find: /Users: No such
hi
I used find command to find some file names as per input from user. I used it for current directory. It was working fine. Now I tried with giving some other directory path. Its giving issues.
Here what I tried. Script will take input from user say 1_abc.txt, find the file and print list.
been looking all over and can't seem to find an answer for this...
i recently re-installed ubuntu and enabled an encrypted home directory upon installation.
Hi,
I have more than 1000 directories under one directory (lets says under /home/).
Sub directories are like A1 to A100,B1 to B100 etc..
Here my problem is I need to find the files older than 10 days in the directories which starts with A*.
I tried some thing like this which is not working.
Code:
find .