How to create a log file that simply shows the name of a file and what directory it was moved to.
Newbie...Thank you for your help.
I am creating my first script that simply generates subdirectories to organize video, music, and text files within those subdirectories from my current working directory.
PROBLEM: I am trying to write a log file that contains, for each file, the original file name, as well as the new file path/name it was moved to. I think it has something to do with redirect operators, but I do not know where to start.
Here is what the sample output should look like, and my current code is listed below that. My current code works but as of now, it only creates the subdirectories and moves the files within those subdirectories.
SAMPLE RUN:
MY CURRENT CODE:
Moderator's Comments:
edit by bakunin: this looks like homework/coursework, which is forbidden in the regular boards. Please repost the question in the appropriate part of the forum and use the required template for it.
I close this thread until shown that it is not homework.
Dears,
I have a listfile contains list of files path.
i need to read the line of the listfile
mv the file to other directory
and update the listfile by deleting the lines of the listfile.
#!/bin/bash
target=/fstest/INVESTIG/Sadiq/TEST_ARCH
while read -r line || ];
do
mv $line... (19 Replies)
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Hi,
Under '/home' directory, there is one file called 'maddy'.Usually there used to be directories under /home directory.
# ls -alrt
total 132
drwx------ 2 hcladmin sys 4096 May 30 10:54 admin
drwxr-xr-x 29 root root 4096 Aug 27 03:54 ..
drwx------ 2 v6admin dba ... (3 Replies)
I want to create the tarzip file into a destination directory, i am in /var/sftp/home/archive/rquadri directory and i am using below command. However it is creating the file in the /var/sftp/home/archive/rquadri directory itself instead of /tmp, may i please know how do i resolve this.
tar -cvzf... (5 Replies)
Hi All,
is there any work around to generate the file and directory structure like below at left side at Output? and exclude all file except .abc .txt
Current Directory structure
|-------------files
|---------------Share
|-----------------dir1
|-----------------dir2... (11 Replies)
I have more than 10K songs in two directories on a hard drive. I would like to create a file list all of files name then change to .xml extension to upload to iPhone so I have a Karaoke list on my iPhone.
I need your help to create a file by using command in Linux.
Files names:
0001 More... (4 Replies)
create a file inside a directory in one command
like
current directory is root
i want to create a directory inside root and a file inside that directory
is there any command like
touch /d/d.txt d directory does not exist (1 Reply)
Hi
How to create a directory structure with getting input from a file.
I have file in that following lines are written.
./activemq-4.1.2/activemq-core-4.1.2.jar
./activemq-4.1.2/backport-util-concurrent-2.1.jar
./camel-1.4.0/apache-camel-1.4.0.jar
./camel-1.4.0/lib/activation-1.1.jar... (12 Replies)
Hi guys. Can someone point me to a resource that explains this? Basically these are websphere logs that need to be stored daily, I'm on sunOS 5.8. Each new file stored could have the current time as its filename. The script could be run on a cron which I can set up. I'm just not sure how to write... (0 Replies)
Hi, Im newbie,
I wanna to create file in each user directory, how to make that script, maybe someone can give me example, im confusing coz i have to change form one user directory to other
Thank U. (8 Replies)