I am doing a simple "recycle bin" script. It is to check and see if the directory .TRASH exists within the home directory. If not then it makes the directory then appends a date and time to file and then finally moves the file in.
Hello everyone,
First sorry for my english.
I'm new in python and I want to create a script that allows the cleaning of a directory (/ tmp), files corresponds to a specific process according to the date.
Steps:
1 - I have to find all processes of a program running, eg OpenOffice, belonging to a User, by determining the date /start time of the oldest of them.
2 - Then delete all files (or dir
I'm new to Unix, and just had a quick question.
I'm writing a bash script, and I was wondering what proper programming etiquette was for piping. How many pipes is too many pipes?
Code:
OLDEST=$(find . -maxdepth 1 -type d -newermt 2012-07-01 ! -newermt
2012-07-30 | xargs ls -1td | tail -2)
echo "${OLDEST}\n"
My next step would be to tar those directories, then move them.
I'm trying to create a Bash script which will move files to the trash, basically something that does the same thing as "kioclient move file1 file2 file3 trash:/" but more easily.
Good evening, I'm currently working on a BASH script to convert audio between file formats and I've come across a snag. At the beginning of the script, I'm having the system check to see if any files with the .m4a extension exist in the directory, and if so, it runs the script. If there are no .m4a extensions, it produces an error.
Heh, working on a bash script to chop up a file based on its filesize.
Hello Friends,
I am trying to create an rsync file restore script.
I was trying to move a file up to the parent directory of the one it was in. I thought I could just use the command mv application.txt ..
Hello I'm doing a script for doing backups but i can only backup directories from / any other files for example /etc/X11 cannot be backed up. how do i solve this?
this is the code i'm using now:
#!/bin/bash
clear
read -p "Enter the directory to backup:" DIRECTORY
echo
echo "backing up $DIRECTORY"